Package com.logicaldoc.ai.nlp
Class Classifier
java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.ai.AIModel<String,String>
 
com.logicaldoc.ai.nlp.NaturalLanguageModel
com.logicaldoc.ai.nlp.Classifier
- All Implemented Interfaces:
- Serializable
Classifies a text on the basis of natural language. It must be trained with
 pairs of strings where the first element is the category and the second is a
 pertinent text that must terminate with the sequence ' .', a tab character
 must be used to separate the two elements
 
 
SEARCHDOC Find documents with content "papers" . GETDOC Get document with ID 1233587 . SEARCHFILE Get document called "paper.pdf" .
- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
- 
Field SummaryFields inherited from class com.logicaldoc.ai.AIModelAIQUERY, AIQUERY_HYPHENFields inherited from class com.logicaldoc.core.PersistentObjectDELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGets the ordered list of feature namesConcrete implementations must give a prediction from a single sentenceMethods inherited from class com.logicaldoc.ai.nlp.NaturalLanguageModelequals, getCutoff, getLanguage, getNgramMax, getNgramMin, hashCode, setCutoff, setLanguage, setNgramMax, setNgramMinMethods inherited from class com.logicaldoc.ai.AIModelgetDescription, getLabel, getName, getTraining, newModel, query, setDescription, setLabel, setName, setTraining, toString, typesMethods inherited from class com.logicaldoc.core.PersistentObjectgetCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId
- 
Constructor Details- 
Classifierpublic Classifier()
- 
Classifier
- 
Classifier
 
- 
- 
Method Details- 
getFeaturesListDescription copied from class:AIModelGets the ordered list of feature names- Specified by:
- getFeaturesListin class- AIModel<String,- String> 
- Returns:
- list of feature names
 
- 
querypublic QueryResult<String> query(String content) throws IOException, com.logicaldoc.core.PersistenceException Description copied from class:NaturalLanguageModelConcrete implementations must give a prediction from a single sentence- Specified by:
- queryin class- NaturalLanguageModel
- Parameters:
- content- The sentence to process
- Returns:
- The prediction
- Throws:
- IOException- I/O error
- com.logicaldoc.core.PersistenceException- Error in the data layer
 
 
-