public class Parser extends AbstractBottomUpParser
| Modifier and Type | Field and Description | 
|---|---|
static String | 
ATTACH_DAUGHTER
Outcome used when a node should be attached as a daughter to another node. 
 | 
static String | 
ATTACH_SISTER
Outcome used when a node should be attached as a sister to another node. 
 | 
static String | 
BUILT
Label used to distinguish build nodes from non-built nodes. 
 | 
static String | 
DONE
Outcome used when a constituent needs an no additional parent node/building. 
 | 
static String | 
NON_ATTACH
Outcome used when a node should not be attached to another node. 
 | 
COMPLETE, CONT, defaultAdvancePercentage, defaultBeamSize, INC_NODE, INCOMPLETE, OTHER, START, TOK_NODE, TOP_NODE, ZERO| Constructor and Description | 
|---|
Parser(ParserModel model)  | 
Parser(ParserModel model,
      int beamSize,
      double advancePercentage)  | 
| Modifier and Type | Method and Description | 
|---|---|
static List<Parse> | 
getRightFrontier(Parse root,
                Set<String> punctSet)
Returns the right frontier of the specified parse tree with nodes ordered from deepest
 to shallowest. 
 | 
static ParserModel | 
train(String languageCode,
     ObjectStream<Parse> parseSamples,
     HeadRules rules,
     int iterations,
     int cut)  | 
static ParserModel | 
train(String languageCode,
     ObjectStream<Parse> parseSamples,
     HeadRules rules,
     TrainingParameters mlParams)  | 
buildDictionary, buildDictionary, collapsePunctuation, parse, parse, setErrorReporting, setParentspublic static final String DONE
public static final String ATTACH_SISTER
public static final String ATTACH_DAUGHTER
public static final String NON_ATTACH
public static final String BUILT
public Parser(ParserModel model, int beamSize, double advancePercentage)
public Parser(ParserModel model)
public static List<Parse> getRightFrontier(Parse root, Set<String> punctSet)
root - The root of the parse tree.public static ParserModel train(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, TrainingParameters mlParams) throws IOException
IOExceptionpublic static ParserModel train(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, int iterations, int cut) throws IOException
IOExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.