基于mynlp的感知机分词实现

2020-08-23  本文已影响0人  菠萝炒鸡蛋

代码:

/**
 * 感知机分词
 * 感知机分词器是基于BEMS标注的,结构化感知机分词算法实现。
 */
public class BemsSplit {
    public static void main(String[] args) {
        Lexer lexer = Lexers.perceptronBuilder()
                .withPos()
                .withPersonName()
                .withNer()
                .build();
        System.out.println(lexer.scan("2001年,他还在纽约医学院工作时,在英国学术刊物《自然》上发表一篇论文"));
    }
}

上一篇 下一篇

猜你喜欢

热点阅读