edu.stanford.nlp.lexgram
Class SimpleGrammarFileReader
java.lang.Object
|
+--edu.stanford.nlp.lexgram.SimpleGrammarFileReader
- public final class SimpleGrammarFileReader
- extends Object
A simple class to read grammars.
The format of the grammars is:
# lines beginning with a hash (can be preceded by whitespace) are ignored
cat -> cat+ %% score
A rule may not have an empty righthand side.
It must have a score, even if this is going to be ignored later
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleGrammarFileReader
public SimpleGrammarFileReader(File file)
throws FileNotFoundException
SimpleGrammarFileReader
public SimpleGrammarFileReader(String filename)
throws FileNotFoundException
readRule
public SimpleRule readRule()
addAllToGrammar
public void addAllToGrammar(SimpleGrammar grammar)
Stanford NLP Group