All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mayabot.nlp.segment.reader.DefaultLexerReader Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy