Class ParserFactory

java.lang.Object
opennlp.tools.parser.ParserFactory

public class ParserFactory extends Object
  • Method Details

    • create

      public static opennlp.tools.parser.Parser create(ParserModel model, int beamSize, double advancePercentage)
      Instantiates a Parser via a given model and other configuration parameters.
      Parameters:
      model - The ParserModel to use.
      beamSize - The number of different parses kept during parsing.
      advancePercentage - The minimal amount of probability mass which advanced outcomes must represent. Only outcomes which contribute to the top advancePercentage will be explored.
      Returns:
      A valid Parser instance.
      Throws:
      IllegalStateException - Thrown if the ParserType is not supported.
      See Also:
    • create

      public static opennlp.tools.parser.Parser create(ParserModel model)
      Instantiates a Parser via a given model and default configuration parameters (see: AbstractBottomUpParser).
      Parameters:
      model - The ParserModel to use.
      Returns:
      A valid Parser instance.
      Throws:
      IllegalStateException - Thrown if the ParserType is not supported.
      See Also: