|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.egothor.stemmer.Trie
org.egothor.stemmer.MultiTrie
public class MultiTrie
The MultiTrie is a Trie of Tries. It stores words and their associated patch commands. The MultiTrie handles patch commands individually (each command by itself).
| Constructor Summary | |
|---|---|
MultiTrie(boolean forward)
Constructor for the MultiTrie object |
|
MultiTrie(DataInput is)
Constructor for the MultiTrie object. |
|
| Method Summary | |
|---|---|
void |
add(CharSequence key,
CharSequence cmd)
Add an element to this structure consisting of the given key and patch command. |
CharSequence |
getFully(CharSequence key)
Return the element that is stored in a cell associated with the given key. |
CharSequence |
getLastOnPath(CharSequence key)
Return the element that is stored as last on a path belonging to the given key. |
void |
printInfo(PrintStream out,
CharSequence prefix)
Print the given prefix and the position(s) in the Trie where it appears. |
Trie |
reduce(Reduce by)
Remove empty rows from the given Trie and return the newly reduced Trie. |
void |
store(DataOutput os)
Write this data structure to the given output stream. |
| Methods inherited from class org.egothor.stemmer.Trie |
|---|
getAll, getCells, getCellsPnt, getCellsVal |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiTrie(DataInput is)
throws IOException
is - the input stream
IOException - if an I/O error occurspublic MultiTrie(boolean forward)
forward - set to true if the elements should be read left to
right| Method Detail |
|---|
public CharSequence getFully(CharSequence key)
getFully in class Triekey - the key to the cell holding the desired element
public CharSequence getLastOnPath(CharSequence key)
getLastOnPath in class Triekey - the key associated with the desired element
public void store(DataOutput os)
throws IOException
store in class Trieos - the output stream
IOException - if an I/O error occurs
public void add(CharSequence key,
CharSequence cmd)
This method will return without executing if the cmd parameter's length is 0.
key - the keycmd - the patch commandpublic Trie reduce(Reduce by)
reduce in class Trieby - the Trie to reduce
public void printInfo(PrintStream out,
CharSequence prefix)
printInfo in class Trieprefix - the desired prefix
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||