Package com.logicaldoc.via
Class NLP
java.lang.Object
com.logicaldoc.via.NLP
basic operations of Natural Language Processing
- Since:
- 7.8
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncategorize
(String contents) static Locale
detectLocale
(String text) static NLP
static NLP
void
trainCategorizer
(File trainFile) Trains the categorizer and stores the compiled modelvoid
trainDocumentsFinder
(File trainFile) Trains the name finder and stores the compiled model.
-
Field Details
-
CAT_SEARCHDOC
-
CAT_GETDOC
-
-
Method Details
-
getLocale
-
get
-
getByText
- Throws:
IOException
-
detectLocale
- Throws:
IOException
-
trainCategorizer
Trains the categorizer and stores the compiled model- Parameters:
trainFile
- The training file for the categories- Throws:
IOException
- error reading the training files
-
categorize
- Throws:
IOException
-
trainDocumentsFinder
Trains the name finder and stores the compiled model.- Parameters:
trainFile
- The training file in clear form and natural language- Throws:
opennlp.tools.util.InvalidFormatException
- the training files are corruptIOException
- error reading the training files
-
find
- Throws:
IOException
-