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