public class Parser extends AbstractBottomUpParser
chunker, COMPLETE, completeParses, CONT, createDerivationString, debugOn, defaultAdvancePercentage, defaultBeamSize, headRules, INC_NODE, INCOMPLETE, K, M, ndh, odh, OTHER, punctSet, Q, reportFailedParse, START, tagger, TOK_NODE, TOP_NODE, ZERO
Constructor and Description |
---|
Parser(MaxentModel buildModel,
MaxentModel checkModel,
POSTagger tagger,
Chunker chunker,
HeadRules headRules)
Deprecated.
|
Parser(MaxentModel buildModel,
MaxentModel checkModel,
POSTagger tagger,
Chunker chunker,
HeadRules headRules,
int beamSize,
double advancePercentage)
Deprecated.
|
Parser(ParserModel model) |
Parser(ParserModel model,
int beamSize,
double advancePercentage) |
Modifier and Type | Method and Description |
---|---|
protected Parse[] |
advanceParses(Parse p,
double probMass)
Advances the specified parse and returns the an array advanced parses whose probability accounts for
more than the specified amount of probability mass.
|
protected void |
advanceTop(Parse p)
Adds the "TOP" node to the specified parse.
|
static void |
mergeReportIntoManifest(Map<String,String> manifest,
Map<String,String> report,
String namespace) |
static AbstractModel |
train(EventStream es,
int iterations,
int cut)
Deprecated.
Please do not use anymore, use the ObjectStream train methods instead! This method
will be removed soon.
|
static ParserModel |
train(String languageCode,
ObjectStream<Parse> parseSamples,
HeadRules rules,
int iterations,
int cut)
Deprecated.
use
train(String, ObjectStream, HeadRules, TrainingParameters)
instead and pass in a TrainingParameters object. |
static ParserModel |
train(String languageCode,
ObjectStream<Parse> parseSamples,
HeadRules rules,
TrainingParameters mlParams) |
advanceChunks, advanceTags, buildDictionary, buildDictionary, collapsePunctuation, mapParseIndex, parse, parse, setErrorReporting, setParents
public Parser(ParserModel model, int beamSize, double advancePercentage)
public Parser(ParserModel model)
@Deprecated public Parser(MaxentModel buildModel, MaxentModel checkModel, POSTagger tagger, Chunker chunker, HeadRules headRules)
buildModel
- The model to assign constituent labels.checkModel
- The model to determine a constituent is complete.tagger
- The model to assign pos-tags.chunker
- The model to assign flat constituent labels.headRules
- The head rules for head word perculation.@Deprecated public Parser(MaxentModel buildModel, MaxentModel checkModel, POSTagger tagger, Chunker chunker, HeadRules headRules, int beamSize, double advancePercentage)
buildModel
- The model to assign constituent labels.checkModel
- The model to determine a constituent is complete.tagger
- The model to assign pos-tags.chunker
- The model to assign flat constituent labels.headRules
- The head rules for head word perculation.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.protected void advanceTop(Parse p)
AbstractBottomUpParser
advanceTop
in class AbstractBottomUpParser
p
- The complete parse.protected Parse[] advanceParses(Parse p, double probMass)
AbstractBottomUpParser
advanceParses
in class AbstractBottomUpParser
p
- The parse to advance.probMass
- The amount of probability mass that should be accounted for by the advanced parses.@Deprecated public static AbstractModel train(EventStream es, int iterations, int cut) throws IOException
IOException
public static void mergeReportIntoManifest(Map<String,String> manifest, Map<String,String> report, String namespace)
public static ParserModel train(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, TrainingParameters mlParams) throws IOException
IOException
@Deprecated public static ParserModel train(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, int iterations, int cut) throws IOException
train(String, ObjectStream, HeadRules, TrainingParameters)
instead and pass in a TrainingParameters object.IOException
Copyright © 2016 The Apache Software Foundation. All rights reserved.