Class Parser

All Implemented Interfaces:
opennlp.tools.parser.Parser

public class Parser extends AbstractBottomUpParser
A shift reduce style Parser implementation based on Adwait Ratnaparkhi's 1998 thesis.
See Also:
  • Constructor Details

  • Method Details

    • mergeReportIntoManifest

      public static void mergeReportIntoManifest(Map<String,String> manifest, Map<String,String> report, String namespace)
    • train

      public static ParserModel train(String languageCode, opennlp.tools.util.ObjectStream<opennlp.tools.parser.Parse> parseSamples, opennlp.tools.parser.HeadRules rules, opennlp.tools.util.TrainingParameters mlParams) throws IOException
      Starts a training of a ParserModel.
      Parameters:
      languageCode - An ISO conform language code.
      parseSamples - The samples as input.
      rules - The HeadRules to use.
      mlParams - The parameters for training.
      Returns:
      A valid ParserModel.
      Throws:
      IOException - Thrown if IO errors occurred during training.