Search in sources :

Example 1 with MmsegTokenizer

use of com.jstarcraft.nlp.tokenization.mmseg.MmsegTokenizer in project jstarcraft-nlp by HongZhaoHua.

the class MmsegSegmentFactory method getNlpTokenizer.

@Override
protected NlpTokenizer<? extends NlpToken> getNlpTokenizer(Map<String, String> configurations) {
    MMSeg segment = build(configurations);
    MmsegTokenizer tokenizer = new MmsegTokenizer(segment);
    return tokenizer;
}
Also used : MMSeg(com.chenlb.mmseg4j.MMSeg) MmsegTokenizer(com.jstarcraft.nlp.tokenization.mmseg.MmsegTokenizer)

Example 2 with MmsegTokenizer

use of com.jstarcraft.nlp.tokenization.mmseg.MmsegTokenizer in project jstarcraft-nlp by HongZhaoHua.

the class MmsegTokenizerTestCase method getTokenizer.

@Override
protected NlpTokenizer<? extends NlpToken> getTokenizer() {
    Dictionary dictionary = Dictionary.getInstance();
    ComplexSeg complex = new ComplexSeg(dictionary);
    MMSeg mmSeg = new MMSeg(new StringReader(""), complex);
    return new MmsegTokenizer(mmSeg);
}
Also used : Dictionary(com.chenlb.mmseg4j.Dictionary) ComplexSeg(com.chenlb.mmseg4j.ComplexSeg) MMSeg(com.chenlb.mmseg4j.MMSeg) StringReader(java.io.StringReader) MmsegTokenizer(com.jstarcraft.nlp.tokenization.mmseg.MmsegTokenizer)

Aggregations

MMSeg (com.chenlb.mmseg4j.MMSeg)2 MmsegTokenizer (com.jstarcraft.nlp.tokenization.mmseg.MmsegTokenizer)2 ComplexSeg (com.chenlb.mmseg4j.ComplexSeg)1 Dictionary (com.chenlb.mmseg4j.Dictionary)1 StringReader (java.io.StringReader)1