Package com.logicaldoc.ai.nlp
Class TokensDetector
java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.ai.AIModel<String,String>
com.logicaldoc.ai.nlp.NaturalLanguageModel
com.logicaldoc.ai.nlp.TokensDetector
- All Implemented Interfaces:
Serializable
An
NaturalLanguageModel
specialized in recognizing tokens inside
sentences. Must be trained with sentences with token specifications, eg:
I am searching for the document with id <START:docid> 12356897 <END> , please send it me.
Here you go, this is the document <START:docid> 12356897 <END> as per your request.
- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
-
Field Summary
Fields inherited from class com.logicaldoc.ai.AIModel
AIQUERY, AIQUERY_HYPHEN
Fields inherited from class com.logicaldoc.core.PersistentObject
DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the ordered list of feature namesConcrete implementations must give a prediction from a single sentenceMethods inherited from class com.logicaldoc.ai.nlp.NaturalLanguageModel
equals, getCutoff, getLanguage, getNgramMax, getNgramMin, hashCode, setCutoff, setLanguage, setNgramMax, setNgramMin
Methods inherited from class com.logicaldoc.ai.AIModel
getDescription, getLabel, getName, getTraining, newModel, query, setDescription, setLabel, setName, setTraining, toString, types
Methods inherited from class com.logicaldoc.core.PersistentObject
getCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId
-
Constructor Details
-
TokensDetector
public TokensDetector() -
TokensDetector
-
TokensDetector
-
-
Method Details
-
getFeaturesList
Description copied from class:AIModel
Gets the ordered list of feature names- Specified by:
getFeaturesList
in classAIModel<String,
String> - Returns:
- list of feature names
-
query
public QueryResult<String> query(String sentence) throws IOException, com.logicaldoc.core.PersistenceException Description copied from class:NaturalLanguageModel
Concrete implementations must give a prediction from a single sentence- Specified by:
query
in classNaturalLanguageModel
- Parameters:
sentence
- The sentence to process- Returns:
- The prediction
- Throws:
IOException
- I/O errorcom.logicaldoc.core.PersistenceException
- Error in the data layer
-