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 Parser
create(ParserModel model)
Instantiates aParser
via a givenmodel
and default configuration parameters (see:AbstractBottomUpParser
).static Parser
create(ParserModel model, int beamSize, double advancePercentage)
Instantiates aParser
via a givenmodel
and other configuration parameters.
-
-
-
Method Detail
-
create
public static Parser create(ParserModel model, int beamSize, double advancePercentage)
Instantiates aParser
via a givenmodel
and other configuration parameters.- Parameters:
model
- TheParserModel
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 topadvancePercentage
will be explored.- Returns:
- A valid
Parser
instance. - Throws:
IllegalStateException
- Thrown if theParserType
is not supported.- See Also:
Parser
,ParserModel
-
create
public static Parser create(ParserModel model)
Instantiates aParser
via a givenmodel
and default configuration parameters (see:AbstractBottomUpParser
).- Parameters:
model
- TheParserModel
to use.- Returns:
- A valid
Parser
instance. - Throws:
IllegalStateException
- Thrown if theParserType
is not supported.- See Also:
Parser
,AbstractBottomUpParser
-
-