public abstract class CondensedTreeAutomaton<State> extends TreeAutomaton<State>
TreeAutomaton.BottomUpStateVisitorD, DEBUG_STORE| Constructor and Description |
|---|
CondensedTreeAutomaton(Signature signature) |
| Modifier and Type | Method and Description |
|---|---|
int |
addLabelSetID(IntSet labels) |
int |
addLabelSetID(String[] labels,
int arity) |
int |
addState(State state) |
CondensedRule |
createRule(State parent,
List<String> labels,
List<State> children) |
CondensedRule |
createRule(State parent,
List<String> labels,
List<State> children,
double weight) |
CondensedRule |
createRule(State parent,
String[] labels,
State[] children) |
CondensedRule |
createRule(State parent,
String[] labels,
State[] children,
double weight) |
CondensedRule |
createRuleRaw(int parent,
int labelSetID,
int[] children,
double weight)
Creates a new Condensed Rule with parentState, labels and children
already resolved to int values.
|
abstract Iterable<CondensedRule> |
getCondensedRulesBottomUp(IntSet labelId,
int[] childStates) |
Iterable<CondensedRule> |
getCondensedRulesBottomUpFromExplicit(int[] childStates) |
Iterable<CondensedRule> |
getCondensedRulesByParentState(int parentState)
Returns an Iterable over all CondensedRules that have a given
parentstate.
|
Set<CondensedRule> |
getCondensedRuleSet()
Returns a set of all rules, that are part of this automaton.
|
Iterable<CondensedRule> |
getCondensedRulesForRhsState(int rhsState) |
abstract Iterable<CondensedRule> |
getCondensedRulesTopDown(IntSet labelId,
int parentState) |
IntSet |
getLabelsForID(int labelSetID) |
Set<Rule> |
getRulesBottomUp(int labelId,
int[] childStates)
Finds automaton rules bottom-up for a given list of child states and a
given parent label.
|
Set<Rule> |
getRulesTopDown(int labelId,
int parentState)
Finds automaton rules top-down for a given parent state and label.
|
boolean |
isBottomUpDeterministic()
Determines whether the automaton is deterministic if read as a bottom-up
automaton.
|
abstract void |
makeAllRulesCondensedExplicit()
Stores all information about CondensedRules in the ruleTrie and
topDownRules structures.
|
String |
toString()
Returns a graphic representation of this Automaton that shows the actual
CondensedRules
|
String |
toStringFull()
Returns a string representation of this condensed automaton with
all the individual rules spelled out.
|
accepts, acceptsRaw, analyze, asConcreteTreeAutomaton, asConcreteTreeAutomatonBottomUp, asConcreteTreeAutomatonWithStringStates, countTrees, createRule, createRule, createRule, createRule, createRule, createRule, determinize, determinize, dumpToFile, equals, evaluateInSemiring, evaluateInSemiring, evaluateInSemiringTopDown, foreachRuleBottomUpForSets, foreachRuleTopDown, foreachStateInBottomUpOrder, getAllLabels, getAllRulesTopDown, getAllStates, getFinalStates, getIdForState, getLabelsTopDown, getNumberOfRules, getNumberOfSeenStates, getRandomRuleTree, getRandomRuleTreeFromInside, getRandomTree, getRandomTreeFromInside, getReachableStates, getRulesBottomUp, getRulesBottomUp, getRuleSet, getRulesForRhsState, getRulesTopDown, getRuleTree, getSignature, getStateForId, getStateInterner, getStatesInBottomUpOrder, getStoredConstantsForID, getWeight, getWeightRaw, hasRuleWithPrefix, hasStoredConstants, homomorphism, inside, intersect, intersect, intersectBottomUp, intersectCondensed, intersectCondensed, intersectCondensed, intersectCondensedBottomUp, intersectCondensedBottomUp, intersectEarley, intersectViterbi, intersectViterbi, inverseCondensedHomomorphism, inverseHomomorphism, isCyclic, isEmpty, isStoring, language, languageIterable, languageIterator, languageIteratorRaw, languageRaw, makeAllRulesExplicit, newSiblingFinder, normalizeRuleWeights, outside, processAllRulesBottomUp, processAllRulesTopDown, reduceTopDown, run, run, runRaw, setRulePrintingFilter, setSkipFail, setStoring, sortedLanguageIterator, supportsBottomUpQueries, supportsTopDownQueries, toStringBottomUp, useSiblingFinder, viterbi, viterbiRaw, writepublic CondensedTreeAutomaton(Signature signature)
public CondensedRule createRule(State parent, List<String> labels, List<State> children, double weight)
public CondensedRule createRule(State parent, String[] labels, State[] children)
public CondensedRule createRule(State parent, String[] labels, State[] children, double weight)
public CondensedRule createRuleRaw(int parent, int labelSetID, int[] children, double weight)
parent - labelSetID - children - weight - public int addLabelSetID(String[] labels, int arity)
public int addLabelSetID(IntSet labels)
public IntSet getLabelsForID(int labelSetID)
public int addState(State state)
public abstract Iterable<CondensedRule> getCondensedRulesBottomUp(IntSet labelId, int[] childStates)
public abstract Iterable<CondensedRule> getCondensedRulesTopDown(IntSet labelId, int parentState)
public Iterable<CondensedRule> getCondensedRulesBottomUpFromExplicit(int[] childStates)
public Iterable<CondensedRule> getCondensedRulesForRhsState(int rhsState)
public boolean isBottomUpDeterministic()
TreeAutomatonisBottomUpDeterministic in class TreeAutomaton<State>public Set<Rule> getRulesBottomUp(int labelId, int[] childStates)
TreeAutomatongetRulesBottomUp in class TreeAutomaton<State>public Set<Rule> getRulesTopDown(int labelId, int parentState)
TreeAutomaton
Note that not every method of TreeAutomaton is safely available in your
implementation of getRulesTopDown. Most notably, you can't use the
default implementation of TreeAutomaton.getAllStates(), because that method
makes all rules of the automaton explicit and calls TreeAutomaton.getRulesTopDown(int, int)
in the process, leading to an infinite recursion.
getRulesTopDown in class TreeAutomaton<State>public Iterable<CondensedRule> getCondensedRulesByParentState(int parentState)
parentState - public Set<CondensedRule> getCondensedRuleSet()
public String toStringFull()
public String toString()
toString in class TreeAutomaton<State>public abstract void makeAllRulesCondensedExplicit()
Copyright © 2017. All rights reserved.