Package opennlp.tools.parser
Class ParserFactory
- java.lang.Object
-
- opennlp.tools.parser.ParserFactory
-
public class ParserFactory extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Parsercreate(ParserModel model)Instantiates aParservia a givenmodeland default configuration parameters (see:AbstractBottomUpParser).static Parsercreate(ParserModel model, int beamSize, double advancePercentage)Instantiates aParservia a givenmodeland other configuration parameters.
-
-
-
Method Detail
-
create
public static Parser create(ParserModel model, int beamSize, double advancePercentage)
Instantiates aParservia a givenmodeland other configuration parameters.- Parameters:
model- TheParserModelto 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 topadvancePercentagewill be explored.- Returns:
- A valid
Parserinstance. - Throws:
IllegalStateException- Thrown if theParserTypeis not supported.- See Also:
Parser,ParserModel
-
create
public static Parser create(ParserModel model)
Instantiates aParservia a givenmodeland default configuration parameters (see:AbstractBottomUpParser).- Parameters:
model- TheParserModelto use.- Returns:
- A valid
Parserinstance. - Throws:
IllegalStateException- Thrown if theParserTypeis not supported.- See Also:
Parser,AbstractBottomUpParser
-
-