Package org.ictclas4j.segment

Examples of org.ictclas4j.segment.Segment.split()


          int segPathCount = Integer.parseInt(jtSegPathCount.getText());
          DictLib dictLib=SegMain.dictLib;
          Segment seg=new Segment(dictLib,segPathCount);
          seg.setOutputMidResult(true);
          seg.setRecogniseUnknown(true);
          SegResult sr = seg.split(jtSrcMsg.getText());
          jtSplitMsg.setText( sr.toString());
        }
      });
    }
    return jbSplitOK;
View Full Code Here


            ArrayList<String> testCases = GFFile.readTxtFile2("test"+GFFinal.FILE_SEP+"case1.txt");
           
            long times=System.currentTimeMillis();
            for (int i = 0; i < forCount; i++) {
              for (String src : testCases) {
                SegResult sr =seg.split(src);
                bytes += src.getBytes().length;
                jtSplitMsg.setText(sr.toString());
              }
            }
           
View Full Code Here

    // then,segment factly
    if (result == null) {
      Segment seg = new Segment(dictLib, 1);
      seg.setOutputMidResult(true);
      seg.setRecogniseUnknown(true);
      result = seg.split(content);

      // cache it
      if (result != null) {
        dictLib.addCachedSeg(content, result);
      }
View Full Code Here

      ArrayList<String> testCases = GFFile.readTxtFile2("test" + GFFinal.FILE_SEP + "case1.txt");

      long times = System.currentTimeMillis();
      for (int i = 0; i < forCount; i++) {
        for (String src : testCases) {
          SegResult sr = seg.split(src);
          bytes += src.getBytes().length;
          //��ӡ����Ἣ���Ӱ���ٶ�
//          System.out.println(sr);
        }
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.