|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.eos.analyzer.SentenceTokenizer
public class SentenceTokenizer
Tokenized a text into sentences.
Based on BreakIterator.getLineInstance(Locale).
| Field Summary | |
|---|---|
static String |
SENTENCE_TYPE
|
| Constructor Summary | |
|---|---|
SentenceTokenizer()
|
|
SentenceTokenizer(CharSequence text)
Creates a new tokenizer. |
|
SentenceTokenizer(CharSequence text,
Locale locale)
Creates a new tokenizer. |
|
| Method Summary | |
|---|---|
Token |
next()
The next token or null. |
protected CharSequence |
nextSentence()
Override this method to implement a different sentence tokenizer. |
void |
reset(CharSequence input)
Inits the tokenizer with new input data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SENTENCE_TYPE
| Constructor Detail |
|---|
public SentenceTokenizer()
public SentenceTokenizer(CharSequence text)
default Locale.
text - the text to tokenize into sentences.
public SentenceTokenizer(CharSequence text,
Locale locale)
text - the text to tokenize into sentences.locale - | Method Detail |
|---|
public Token next()
throws TokenizerException
Tokenizernull.
next in interface Tokenizernull
TokenizerException
public void reset(CharSequence input)
throws TokenizerException
ResettableTokenizer
reset in interface ResettableTokenizerinput - represents new input data for the tokenizer.
TokenizerException
protected CharSequence nextSentence()
throws TokenizerException
null if no next sentence available.
TokenizerException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||