com.ibm.icu.text
public class DictionaryBasedBreakIterator extends RuleBasedBreakIterator
fDebugEnv, fDictionaryCharCount, fRData, fTrace, WORD_IDEO, WORD_IDEO_LIMIT, WORD_KANA, WORD_KANA_LIMIT, WORD_LETTER, WORD_LETTER_LIMIT, WORD_NONE, WORD_NONE_LIMIT, WORD_NUMBER, WORD_NUMBER_LIMIT
DONE, KIND_CHARACTER, KIND_LINE, KIND_SENTENCE, KIND_TITLE, KIND_WORD
Modifier | Constructor and Description |
---|---|
protected |
DictionaryBasedBreakIterator(java.io.InputStream compiledRules)
Deprecated.
This API is ICU internal only.
|
|
DictionaryBasedBreakIterator(java.io.InputStream compiledRules,
java.io.InputStream dictionaryStream)
Deprecated.
This API is ICU internal only.
|
|
DictionaryBasedBreakIterator(java.lang.String rules,
java.io.InputStream dictionaryStream)
Constructs a DictionaryBasedBreakIterator.
|
Modifier and Type | Method and Description |
---|---|
int |
first()
Sets the current iteration position to the beginning of the text.
|
int |
following(int offset)
Sets the current iteration position to the first boundary position after
the specified position.
|
int |
getRuleStatus()
Return the status tag from the break rule that determined the most recently
returned break position.
|
int |
getRuleStatusVec(int[] fillInArray)
Get the status (tag) values from the break rule(s) that determined the most
recently returned break position.
|
protected int |
handleNext()
Deprecated.
This API is ICU internal only.
|
int |
last()
Sets the current iteration position to the end of the text.
|
int |
preceding(int offset)
Sets the current iteration position to the last boundary position
before the specified position.
|
int |
previous()
Advances the iterator one step backwards.
|
void |
setText(java.text.CharacterIterator newText)
Set the iterator to analyze a new piece of text.
|
checkOffset, clone, current, dump, equals, getInstanceFromCompiledRules, getText, hashCode, isBoundary, next, next, toString
getAvailableLocales, getAvailableULocales, getBreakInstance, getCharacterInstance, getCharacterInstance, getCharacterInstance, getLineInstance, getLineInstance, getLineInstance, getLocale, getSentenceInstance, getSentenceInstance, getSentenceInstance, getTitleInstance, getTitleInstance, getTitleInstance, getWordInstance, getWordInstance, getWordInstance, registerInstance, registerInstance, setText, unregister
protected DictionaryBasedBreakIterator(java.io.InputStream compiledRules) throws java.io.IOException
compiledRules
- an input stream containing the binary (flattened) compiled rules.java.io.IOException
public DictionaryBasedBreakIterator(java.lang.String rules, java.io.InputStream dictionaryStream) throws java.io.IOException
rules
- Same as the rules parameter on RuleBasedBreakIterator,
except for the special meaning of "_dictionary_". This parameter is just
passed through to RuleBasedBreakIterator constructor.dictionaryStream
- the stream containing the dictionary datajava.io.IOException
public DictionaryBasedBreakIterator(java.io.InputStream compiledRules, java.io.InputStream dictionaryStream) throws java.io.IOException
compiledRules
- an input stream containing the binary (flattened) compiled rules.dictionaryStream
- an input stream containing the dictionary datajava.io.IOException
public void setText(java.text.CharacterIterator newText)
RuleBasedBreakIterator
setText
in class RuleBasedBreakIterator
newText
- An iterator over the text to analyze.public int first()
first
in class RuleBasedBreakIterator
public int last()
last
in class RuleBasedBreakIterator
public int previous()
previous
in class RuleBasedBreakIterator
public int preceding(int offset)
preceding
in class RuleBasedBreakIterator
offset
- The position to begin searching frompublic int following(int offset)
following
in class RuleBasedBreakIterator
offset
- The position to begin searching forward frompublic int getRuleStatus()
getRuleStatus
in class RuleBasedBreakIterator
public int getRuleStatusVec(int[] fillInArray)
TODO: not supported for dictionary based break iterator.
getRuleStatusVec
in class RuleBasedBreakIterator
fillInArray
- an array to be filled in with the status values.protected int handleNext()
Copyright (c) 2009 IBM Corporation and others.