public class InsideRuleFactory extends Object implements BinaryRuleFactory
InterpretedTreeAutomaton.filterBinarizedForAppearingConstants(java.lang.String, java.lang.Object)
,
which removes all rules connected by binarization
to rules removed due to constants, removes some of these pooled rules that
would be necessary for parsing. Thus, for grammars binarized with this strategy,
use InterpretedTreeAutomaton.filterForAppearingConstants(java.lang.String, java.lang.Object)
instead.Modifier and Type | Field and Description |
---|---|
static String |
NONTERMINAL_SEPARATOR |
Constructor and Description |
---|
InsideRuleFactory(InterpretedTreeAutomaton irtg) |
Modifier and Type | Method and Description |
---|---|
static Function<InterpretedTreeAutomaton,BinaryRuleFactory> |
createFactoryFactory() |
Rule |
generateBinarizedRule(Tree<String> nodeInVartree,
List<String> binarizedChildStates,
String pathToNode,
Rule originalRule,
Tree<String> vartree,
InterpretedTreeAutomaton originalIrtg,
InterpretedTreeAutomaton binarizedIrtg)
Generates an automaton rule for a single node of the common variable tree.
|
public static String NONTERMINAL_SEPARATOR
public InsideRuleFactory(InterpretedTreeAutomaton irtg)
public Rule generateBinarizedRule(Tree<String> nodeInVartree, List<String> binarizedChildStates, String pathToNode, Rule originalRule, Tree<String> vartree, InterpretedTreeAutomaton originalIrtg, InterpretedTreeAutomaton binarizedIrtg)
generateBinarizedRule
in interface BinaryRuleFactory
nodeInVartree
- - the node in the variable tree at which we are generating a rulebinarizedChildStates
- - the states that were generated for the childrenoriginalRule
- - the rule in the original, unbinarized IRTGvartree
- - the variable tree for which we are generating rulesoriginalIrtg
- - the original, unbinarized IRTGbinarizedIrtg
- - the binarized IRTG whose rules we are currently creatingpathToNode
- - the path from the root to this node in the variable tree (in a suitable format for Tree.select(java.lang.String, int)
)public static Function<InterpretedTreeAutomaton,BinaryRuleFactory> createFactoryFactory()
Copyright © 2017. All rights reserved.