Package org.lionsoul.jcseg.sentence
Class SentenceSeg
- java.lang.Object
-
- org.lionsoul.jcseg.sentence.SentenceSeg
-
public class SentenceSeg extends Object
document sentence splitter- Author:
- chenxin
-
-
Field Summary
Fields Modifier and Type Field Description protected IStringBuffergIsbglobal string bufferprotected intidxprotected IPushbackReaderreader
-
Constructor Summary
Constructors Constructor Description SentenceSeg()SentenceSeg(Reader reader)construct method
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sentencenext()get the next sentenceprotected intreadNext()read the next char from the current positionprotected voidreadUntil(char eChar)loop the reader until the specified char is found.voidreset(Reader input)stream/reader reset.
-
-
-
Field Detail
-
idx
protected int idx
-
reader
protected IPushbackReader reader
-
gIsb
protected final IStringBuffer gIsb
global string buffer
-
-
Constructor Detail
-
SentenceSeg
public SentenceSeg(Reader reader) throws IOException
construct method- Parameters:
reader-- Throws:
IOException
-
SentenceSeg
public SentenceSeg() throws IOException- Throws:
IOException
-
-
Method Detail
-
reset
public void reset(Reader input) throws IOException
stream/reader reset.- Parameters:
input-- Throws:
IOException
-
readNext
protected int readNext() throws IOExceptionread the next char from the current position- Throws:
IOException
-
next
public Sentence next() throws IOException
get the next sentence- Returns:
- Sentence
- Throws:
IOException
-
readUntil
protected void readUntil(char eChar) throws IOExceptionloop the reader until the specified char is found.- Parameters:
eChar-- Throws:
IOException
-
-