Class NLP

java.lang.Object
com.logicaldoc.via.NLP

public class NLP extends Object
basic operations of Natural Language Processing
Since:
7.8
Author:
Marco Meschieri - LogicalDOC
  • Method Details Link icon

    • getLocale Link icon

      public Locale getLocale()
    • get Link icon

      public static NLP get(Locale locale)
    • getByText Link icon

      public static NLP getByText(String text) throws IOException
      Throws:
      IOException
    • detectLocale Link icon

      public static Locale detectLocale(String text) throws IOException
      Throws:
      IOException
    • trainCategorizer Link icon

      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
    • categorize Link icon

      public String categorize(String contents) throws IOException
      Throws:
      IOException
    • trainDocumentsFinder Link icon

      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
    • find Link icon

      public List<NameEntity> find(String contents) throws IOException
      Throws:
      IOException