public class BatchWordInputStreamParser extends Object implements WordParser<BatchToken,InputStream>
Constructor and Description |
---|
BatchWordInputStreamParser() |
BatchWordInputStreamParser(String charset) |
Modifier and Type | Method and Description |
---|---|
List<BatchToken> |
nextSentenceTokens()
返回下一个句子中的Token列表
|
BatchToken |
nextToken()
返回下一个Token,如果返回值为空,表示已经以结尾
|
void |
parse(WordParserManager manager,
InputStream inputStream,
WordParserType wordParserType,
WordParserMode wordParserMode)
解析资源,调用此方法时,会清空缓冲
|
Collection<BatchToken> |
tokens()
返回所有解析出来的Token列表,调用时,会把nextToken置为开头
|
public BatchWordInputStreamParser()
public BatchWordInputStreamParser(String charset)
public void parse(WordParserManager manager, InputStream inputStream, WordParserType wordParserType, WordParserMode wordParserMode) throws IOException
WordParser
parse
in interface WordParser<BatchToken,InputStream>
inputStream
- 表示来源IOException
public Collection<BatchToken> tokens()
WordParser
tokens
in interface WordParser<BatchToken,InputStream>
public BatchToken nextToken()
WordParser
nextToken
in interface WordParser<BatchToken,InputStream>
public List<BatchToken> nextSentenceTokens() throws IOException
WordParser
nextSentenceTokens
in interface WordParser<BatchToken,InputStream>
IOException
Copyright © 2006–2018 TinyGroup. All rights reserved.