com.mayabot.nlp.segment.reader.DefaultLexerReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mynlp Show documentation
Show all versions of mynlp Show documentation
Maya Nlp subproject :mynlp
package com.mayabot.nlp.segment.reader;
import com.mayabot.nlp.segment.Lexer;
import com.mayabot.nlp.segment.LexerReader;
import com.mayabot.nlp.segment.WordTermSequence;
import java.io.Reader;
/**
* @author jimichan
*/
public class DefaultLexerReader implements LexerReader {
private final Lexer lexer;
public DefaultLexerReader(Lexer lexer) {
this.lexer = lexer;
}
@Override
public WordTermSequence scan(Reader reader) {
return new WordTermSequence(lexer, reader);
}
@Override
public WordTermSequence scan(String text) {
return new WordTermSequence(lexer, text);
}
}