public class UnaryGrammar extends Object implements Serializable, Iterable<UnaryRule>
| Constructor and Description |
|---|
UnaryGrammar(Index<String> stateIndex) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic int numClosedRules()
public int numRules()
public final void purgeRules()
public double scoreRule(UnaryRule ur)
public final void addRule(UnaryRule ur)
public UnaryRule[] closedRulesByParent(int state)
public UnaryRule[] closedRulesByChild(int state)
public void readData(BufferedReader in) throws IOException
in - The Reader the grammar is read from.IOException - If there is a reading problempublic void writeData(Writer w)
w - Data is written to this Writerpublic void writeAllData(Writer w)
w - Data is written to this Writer