|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.icu.text.BreakDictionary
public class BreakDictionary
This is the class that represents the list of known words used by DictionaryBasedBreakIterator. The conceptual data structure used here is a trie: there is a node hanging off the root node for every letter that can start a word. Each of these nodes has a node hanging off of it for every letter that can be the second letter of a word if this node is the first letter, and so on. The trie is represented as a two-dimensional array that can be treated as a table of state transitions. Indexes are used to compress this array, taking advantage of the fact that this array will always be very sparse.
Constructor Summary | |
---|---|
BreakDictionary(InputStream dictionaryStream)
Deprecated. This API is ICU internal only. |
Method Summary | |
---|---|
short |
at(int row,
char ch)
Deprecated. This API is ICU internal only. |
short |
at(int row,
int col)
Deprecated. This API is ICU internal only. |
static void |
main(String[] args)
Deprecated. This API is ICU internal only. |
void |
printWordList(String partialWord,
int state,
PrintWriter out)
Deprecated. This API is ICU internal only. |
void |
readDictionaryFile(DataInputStream in)
Deprecated. This API is ICU internal only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BreakDictionary(InputStream dictionaryStream) throws IOException
IOException
Method Detail |
---|
public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException, IOException
FileNotFoundException
UnsupportedEncodingException
IOException
public void printWordList(String partialWord, int state, PrintWriter out) throws IOException
IOException
public void readDictionaryFile(DataInputStream in) throws IOException
IOException
public final short at(int row, char ch)
row
- The current statech
- The character whose column we're interested in
public final short at(int row, int col)
row
- The row number of the current statecol
- The column number of the input character (0 means "not a
dictionary character")
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |