|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.text.Trie
public class Trie
Efficient scheme for matching a rote list of sequences of tokens.
Nested Class Summary | |
---|---|
static interface |
Trie.ResultIterator
An extension of Span.Looper which also returns the ids associated with a Span. |
Constructor Summary | |
---|---|
Trie()
|
Method Summary | |
---|---|
void |
addWords(java.lang.String id,
java.lang.String[] words)
Associate a sequence of words with a given id. |
Trie.ResultIterator |
lookup(Span span)
Lookup matches to the trie in the span |
static void |
main(java.lang.String[] argv)
|
java.lang.String |
toString()
Pretty-print the entire trie. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Trie()
Method Detail |
---|
public Trie.ResultIterator lookup(Span span)
public void addWords(java.lang.String id, java.lang.String[] words)
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |