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