Class NLP


  • public class NLP
    extends Object
    basic operations of Natural Language Processing
    Since:
    7.8
    Author:
    Marco Meschieri - LogicalDOC
    • Field Detail

      • CAT_SEARCHDOC

        public static String CAT_SEARCHDOC
      • CAT_GETDOC

        public static String CAT_GETDOC
    • Method Detail

      • getLocale

        public Locale getLocale()
      • get

        public static NLP get​(Locale locale)
      • trainCategorizer

        public void trainCategorizer​(File trainFile)
                              throws IOException
        Trains the categorizer and stores the compiled model
        Parameters:
        trainFile - The training file for the categories
        Throws:
        IOException - error reading the training files
      • trainDocumentsFinder

        public void trainDocumentsFinder​(File trainFile)
                                  throws IOException
        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 corrupt
        IOException - error reading the training files
      • main

        public static void main​(String[] args)
                         throws opennlp.tools.util.InvalidFormatException,
                                IOException
        Throws:
        opennlp.tools.util.InvalidFormatException
        IOException