public class EntityExtractionRequest extends PipelineRequest
| Constructor and Description |
|---|
EntityExtractionRequest(String[] text)
Create a request to extract entities.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getConfidenceThreshold()
Gets the value of the confidence threshold.
|
String |
getContext()
Gets the context used for the extraction.
|
DuplicateEntityStrategy |
getDuplicateEntityStrategy()
Gets the duplicate entity strategy.
|
com.neovisionaries.i18n.LanguageCode |
getLanguage()
Gets the language of the input text.
|
Location |
getLocation()
Gets the
location attribute. |
Map<String,String> |
getMetadata()
Gets the entity metadata.
|
EntityOrder |
getOrder()
Gets the sort
order for the returned entities. |
String[] |
getText()
Gets the text to be processed.
|
String |
getType()
Gets the type of entity to extract.
|
boolean |
isIncludeModelFileNameInMetadata()
Gets whether or not to include the model's filename that extracted the
entity in the entity metadata.
|
void |
setConfidenceThreshold(int confidenceThreshold)
Sets the value of the confidence threshold.
|
void |
setContext(String context)
Sets the context for the extraction.
|
void |
setDuplicateEntityStrategy(DuplicateEntityStrategy duplicateEntityStrategy)
Sets the duplicate entity strategy.
|
void |
setIncludeModelFileNameInMetadata(boolean includeModelFileNameInMetadata)
Sets whether or not to include the model's filename that extracted the
entity in the entity metadata.
|
void |
setLanguage(com.neovisionaries.i18n.LanguageCode languageCode)
Sets the language of the input text.
|
void |
setLocation(Location location)
Sets the
location attribute. |
void |
setMetadata(Map<String,String> metadata)
Sets the entity metadata.
|
void |
setOrder(EntityOrder order)
Sets the sort
order for the returned entities. |
void |
setType(String type)
Sets the type of entity to extract.
|
String |
toString() |
EntityExtractionRequest |
withConfidenceThreshold(int confidenceThreshold)
Sets the confidence threshold.
|
EntityExtractionRequest |
withContext(String context)
Sets the extraction context.
|
EntityExtractionRequest |
withDuplicateEntityStrategy(DuplicateEntityStrategy duplicateEntityStrategy)
Sets the duplicate entity
strategy. |
EntityExtractionRequest |
withIncludeModelFileNameInMetadata(boolean includeModelFileNameInMetadata)
Whether or not to include the filename of the model that extracted the entity in
the entity's metadata.
|
EntityExtractionRequest |
withLanguage(com.neovisionaries.i18n.LanguageCode language) |
EntityExtractionRequest |
withLocation(Location location)
Sets a
location attribute for the entity extraction request. |
EntityExtractionRequest |
withMetadata(Map<String,String> metadata)
Sets the entity metadata.
|
EntityExtractionRequest |
withOrder(EntityOrder order)
The sort
order for the returned entities. |
EntityExtractionRequest |
withType(String type)
Sets the type of entity to extract.
|
public EntityExtractionRequest(String[] text)
text - The text to extract entities from.public EntityExtractionRequest withMetadata(Map<String,String> metadata)
metadata - The entity metadata.EntityExtractionRequest.public EntityExtractionRequest withConfidenceThreshold(int confidenceThreshold)
confidenceThreshold - The confidence threshold.EntityExtractionRequest.public EntityExtractionRequest withContext(String context)
context - The context for the extraction.EntityExtractionRequest.public EntityExtractionRequest withType(String type)
type - The type of entity to extract.EntityExtractionRequest.public EntityExtractionRequest withLanguage(com.neovisionaries.i18n.LanguageCode language)
language - The LanguageCode of the input text.EntityExtractionRequest.public EntityExtractionRequest withOrder(EntityOrder order)
order for the returned entities.order - The sort order for the returned entities.public EntityExtractionRequest withLocation(Location location)
location attribute for the entity extraction request.location - The location.public EntityExtractionRequest withDuplicateEntityStrategy(DuplicateEntityStrategy duplicateEntityStrategy)
strategy. If set this value overrides
the duplicate entity strategy set for the pipeline for this request only.duplicateEntityStrategy - The strategy.public EntityExtractionRequest withIncludeModelFileNameInMetadata(boolean includeModelFileNameInMetadata)
includeModelFileNameInMetadata - A boolean indicating whether or not to include the
filename of the model that extracted this entity.public int getConfidenceThreshold()
public void setConfidenceThreshold(int confidenceThreshold)
confidenceThreshold - The value of the confidence threshold. Valid values are 0-100.public String[] getText()
public com.neovisionaries.i18n.LanguageCode getLanguage()
LanguageCode of the input text.public void setLanguage(com.neovisionaries.i18n.LanguageCode languageCode)
languageCode - The LanguageCode.public String getContext()
public EntityOrder getOrder()
order for the returned entities.order for the returned entities.public void setOrder(EntityOrder order)
order for the returned entities.order - The order for the returned entities.public void setContext(String context)
context - The context for the extraction.public void setLocation(Location location)
location attribute.location - The location.public DuplicateEntityStrategy getDuplicateEntityStrategy()
strategy.public void setDuplicateEntityStrategy(DuplicateEntityStrategy duplicateEntityStrategy)
duplicateEntityStrategy - The duplicate entity strategy.public Map<String,String> getMetadata()
public void setMetadata(Map<String,String> metadata)
metadata - The entity metadata.public String getType()
public void setType(String type)
type - The type of entity to extract.public boolean isIncludeModelFileNameInMetadata()
public void setIncludeModelFileNameInMetadata(boolean includeModelFileNameInMetadata)
includeModelFileNameInMetadata - true to include the model's filename
in the entity's metadata; otherwise false.Copyright © 2018. All rights reserved.