Search in sources :

Example 16 with DijkstraSegment

use of com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment in project HanLP by hankcs.

the class TestPersonRecognition method testChineseNameRecognition.

public void testChineseNameRecognition() throws Exception {
    HanLP.Config.enableDebug();
    Segment segment = new DijkstraSegment();
    System.out.println(segment.seg("编剧邵钧林和稽道青说"));
}
Also used : DijkstraSegment(com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment) NShortSegment(com.hankcs.hanlp.seg.NShort.NShortSegment) Segment(com.hankcs.hanlp.seg.Segment) DijkstraSegment(com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment)

Example 17 with DijkstraSegment

use of com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment in project HanLP by hankcs.

the class TestSegment method testNT.

public void testNT() throws Exception {
    HanLP.Config.enableDebug();
    Segment segment = new DijkstraSegment().enableOrganizationRecognize(true);
    System.out.println(segment.seg("张克智与潍坊地铁建设工程公司"));
}
Also used : DijkstraSegment(com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment) Segment(com.hankcs.hanlp.seg.Segment) DoubleArrayTrieSegment(com.hankcs.hanlp.seg.Other.DoubleArrayTrieSegment) CRFSegment(com.hankcs.hanlp.seg.CRF.CRFSegment) DijkstraSegment(com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment) ViterbiSegment(com.hankcs.hanlp.seg.Viterbi.ViterbiSegment)

Example 18 with DijkstraSegment

use of com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment in project HanLP by hankcs.

the class TestSegment method testSeg.

public void testSeg() throws Exception {
    HanLP.Config.enableDebug();
    Segment segment = new DijkstraSegment();
    System.out.println(segment.seg("我遗忘我的密码了"));
}
Also used : DijkstraSegment(com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment) Segment(com.hankcs.hanlp.seg.Segment) DoubleArrayTrieSegment(com.hankcs.hanlp.seg.Other.DoubleArrayTrieSegment) CRFSegment(com.hankcs.hanlp.seg.CRF.CRFSegment) DijkstraSegment(com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment) ViterbiSegment(com.hankcs.hanlp.seg.Viterbi.ViterbiSegment)

Aggregations

DijkstraSegment (com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment)18 Segment (com.hankcs.hanlp.seg.Segment)5 Term (com.hankcs.hanlp.seg.common.Term)5 CRFSegment (com.hankcs.hanlp.seg.CRF.CRFSegment)3 DoubleArrayTrieSegment (com.hankcs.hanlp.seg.Other.DoubleArrayTrieSegment)3 ViterbiSegment (com.hankcs.hanlp.seg.Viterbi.ViterbiSegment)3 NShortSegment (com.hankcs.hanlp.seg.NShort.NShortSegment)2 ResultTerm (com.hankcs.hanlp.seg.common.ResultTerm)1 File (java.io.File)1 List (java.util.List)1