public class TdbNlpInfo
extends java.lang.Object
You will need TRIPsystem 7.0 or later and TRIPcof on the server in order to make use of this class. You also need TRIPnlp or a custom NLP adapter for TRIPcof installed together with TRIPcof.
TdbRecord.getNlpInfo()| Modifier and Type | Class and Description |
|---|---|
static class |
TdbNlpInfo.FieldMappingType
Field name mapping mode for extracted meta-data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInputField(java.lang.String name)
Add the name of a field on which to base meta-data processing.
|
boolean |
getExtractKeywords()
Returns true if keywords are to be extracted and false otherwise.
|
boolean |
getExtractMetadata()
Returns true if meta-data is to be extracted and false otherwise.
|
boolean |
getFallback()
Get state of fallback behavior.
|
TdbNlpInfo.FieldMappingType |
getFieldMapping()
Get the field name mapping mode to control how extracted meta-data
is stored into the record.
|
java.lang.String |
getKeywordField()
Get the name of the field to receive extracted keywords.
|
java.lang.String |
getMetadataNameField()
Get the name of the tupled field to receive extracted meta-data names.
|
java.lang.String |
getMetadataValueField()
Get the name of the tupled field to receive extracted meta-data values.
|
java.lang.String |
getPreferredAdapter()
Get the ID of the adapter that must be used to perform the
analysis.
|
boolean |
isEnabled()
Returns true if TRIPcof/TRIPnlp interaction is enabled and false otherwise.
|
void |
mapMetadataField(java.lang.String categoryName,
java.lang.String fieldName)
Define a field to hold the values for a particular meta-data category.
|
void |
setExtractKeywords(boolean enable)
Enable or disable the extraction of keywords.
|
void |
setExtractMetadata(boolean enable)
Enable or disable the extraction of meta-data.
|
void |
setFallback(boolean enable)
Enable or disable fallback behavior.
|
void |
setFieldMapping(TdbNlpInfo.FieldMappingType type)
Set the field name mapping mode to control how extracted meta-data
is stored into the record.
|
void |
setInputLanguage(int lang)
Sets the input language of the text in the record to be analyzed.
|
void |
setInputLanguage(java.lang.String lang)
Sets the input language of the text in the record to be analyzed.
|
void |
setInputLanguage(TdbLanguage lang)
Sets the input language of the text in the record to be analyzed.
|
void |
setKeywordField(java.lang.String fieldname)
Set the name of the field to receive extracted keywords.
|
void |
setMetadataTupleFields(java.lang.String namefield,
java.lang.String valuefield)
Set the names of the field to receive extracted meta-data.
|
void |
setPreferredAdapter(java.lang.String adapterid)
Assign the ID of the adapter that must be used to perform the
analysis.
|
public boolean isEnabled()
public void setExtractKeywords(boolean enable)
enable - True to enable and false to disablepublic boolean getExtractKeywords()
public void setExtractMetadata(boolean enable)
enable - True to enable and false to disablepublic boolean getExtractMetadata()
public void setInputLanguage(int lang)
lang - TRIP numerical code of language.public void setInputLanguage(java.lang.String lang)
lang - Natural language type string (ENG, GER, SWE, NOR, FIN, or CHI)public void setInputLanguage(TdbLanguage lang)
lang - Enumerated value representing the language of the textpublic void setFieldMapping(TdbNlpInfo.FieldMappingType type)
type - Mapping type to assignpublic TdbNlpInfo.FieldMappingType getFieldMapping()
public void setPreferredAdapter(java.lang.String adapterid)
adapterid - ID of the TRIPcof NLP adapter to usepublic java.lang.String getPreferredAdapter()
public void setFallback(boolean enable)
enable - True to enable fallback behavior and false to disable.public boolean getFallback()
public void setKeywordField(java.lang.String fieldname)
throws TdbException
fieldname - Name of phrase fieldTdbException - If field does not exist in the database or is not a phrase field.public java.lang.String getKeywordField()
public void setMetadataTupleFields(java.lang.String namefield,
java.lang.String valuefield)
throws TdbException
namefield - Name of phrase field to hold meta-data category namesvaluefield - Name of phrase field to hold meta-data category valuesTdbException - If either field does not exist in the database or is not a phrase field.public java.lang.String getMetadataNameField()
public java.lang.String getMetadataValueField()
public void mapMetadataField(java.lang.String categoryName,
java.lang.String fieldName)
throws TdbException
categoryName - Name of meta-data categoryfieldName - Field to hold the values of the categoryTdbException - If field does not exist in the database or is not a phrase field.public void addInputField(java.lang.String name)
throws TdbException
name - Name of TEXT or PHRASE field from which to get text to analyze.TdbException - If field does not exist in the database or is not of type phrase or text.