天天看點

盤古分詞demo,盤古分詞怎麼用

1、下載下傳PanGu.dll

      dll位址:http://download.csdn.net/detail/dhfekl/7493687

2、将PanGu.dll和詞庫引入到項目

      最新詞庫位址:http://download.csdn.net/detail/dhfekl/7493711

3、初始化

     using PanGu;

     Segment.Init();

4、分詞

     string str="盤古分詞demo2";

    Segment segment = new Segment();

    ICollection<WordInfo> words = segment.DoSegment(str);

結果示範:

盤古分詞demo,盤古分詞怎麼用