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