Package com.logicaldoc.ai.nlp
Class NaturalLanguageModel
java.lang.Object
com.logicaldoc.core.PersistentObject
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Classifier,TokensDetector
A super class of those
AIModels specialized in the processing of the
natural language- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
-
Field Summary
Fields inherited from class com.logicaldoc.ai.AIModel
AIQUERY, AIQUERY_HYPHENFields inherited from class com.logicaldoc.core.PersistentObject
DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintintinthashCode()abstract QueryResult<String> Concrete implementations must give a prediction from a single sentencevoidsetCutoff(int cutoff) voidsetLanguage(String language) voidsetNgramMax(int ngramMax) voidsetNgramMin(int ngramMin) Methods inherited from class com.logicaldoc.ai.AIModel
getDescription, getFeaturesList, getLabel, getName, getTraining, newModel, query, setDescription, setLabel, setName, setTraining, toString, typesMethods inherited from class com.logicaldoc.core.PersistentObject
getCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId
-
Method Details
-
getLanguage
-
setLanguage
-
getCutoff
public int getCutoff() -
setCutoff
public void setCutoff(int cutoff) -
getNgramMin
public int getNgramMin() -
setNgramMin
public void setNgramMin(int ngramMin) -
getNgramMax
public int getNgramMax() -
setNgramMax
public void setNgramMax(int ngramMax) -
query
public abstract QueryResult<String> query(String sentence) throws AIException, IOException, com.logicaldoc.core.PersistenceException Concrete implementations must give a prediction from a single sentence- Parameters:
sentence- The sentence to process- Returns:
- The prediction
- Throws:
AIException- Error in elaborating the AI modelIOException- I/O errorcom.logicaldoc.core.PersistenceException- Error in the data layer
-
hashCode
public int hashCode() -
equals
-