public class ArcStandard extends ParsingSystem
labels, rootLabel, transitions
Constructor and Description |
---|
ArcStandard(TreebankLanguagePack tlp,
List<String> labels,
boolean verbose) |
Modifier and Type | Method and Description |
---|---|
void |
apply(Configuration c,
String t)
Apply the given transition to the given configuration, modifying
the configuration's state in place.
|
boolean |
canApply(Configuration c,
String t)
Determine whether the given transition is legal for this
configuration.
|
boolean |
canReach(Configuration c,
edu.stanford.nlp.parser.nndep.DependencyTree dTree) |
String |
getOracle(Configuration c,
edu.stanford.nlp.parser.nndep.DependencyTree dTree)
Provide a static-oracle recommendation for the next parsing step
to take.
|
Configuration |
initialConfiguration(CoreMap s)
Build an initial parser configuration from the given sentence.
|
boolean |
isOracle(Configuration c,
String t,
edu.stanford.nlp.parser.nndep.DependencyTree dTree)
Determine whether applying the given transition in the given
configuration tree will leave in us a state in which we can reach
the gold tree.
|
boolean |
isTerminal(Configuration c)
Determine if the given configuration corresponds to a parser which
has completed its parse.
|
void |
makeTransitions()
Generate all possible transitions which this parsing system can
take for any given configuration.
|
evaluate, getTransitionID, getUASScore
public ArcStandard(TreebankLanguagePack tlp, List<String> labels, boolean verbose)
public boolean isTerminal(Configuration c)
ParsingSystem
public void makeTransitions()
ParsingSystem
makeTransitions
in class ParsingSystem
public Configuration initialConfiguration(CoreMap s)
ParsingSystem
initialConfiguration
in class ParsingSystem
public boolean canApply(Configuration c, String t)
ParsingSystem
canApply
in class ParsingSystem
c
- Parsing configurationt
- Transition stringpublic void apply(Configuration c, String t)
ParsingSystem
apply
in class ParsingSystem
public String getOracle(Configuration c, edu.stanford.nlp.parser.nndep.DependencyTree dTree)
ParsingSystem
getOracle
in class ParsingSystem
c
- Current parser configurationdTree
- Gold tree which parser needs to reachpublic boolean canReach(Configuration c, edu.stanford.nlp.parser.nndep.DependencyTree dTree)
public boolean isOracle(Configuration c, String t, edu.stanford.nlp.parser.nndep.DependencyTree dTree)
ParsingSystem