Examples of IKSegmentation


Examples of org.wltea.analyzer.IKSegmentation

// +"朋友说我越来越不正常。我说是,一个迷恋夜晚的女子怎么可能正常。 "
// +"有人在背后开始对我指指点点,说一个30岁的女人还不结婚一定是有问题。 "
// +"我不为所动。 但是我知道,总有一天,我会老去,且没有人会再听我说话。";
//    }
    System.out.println("Length = " + testString.length());
    IKSegmentation ikSeg = new IKSegmentation(new StringReader(testString) , false);
   
    try {
      Thread.sleep(5000);
    } catch (InterruptedException e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
    }
   
    long begin = System.currentTimeMillis();  
    try {
//      Lexeme l = null;
//      while( (l = ikSeg.next()) != null){
//        System.out.println(l);
//      }
      while( ikSeg.next()!= null);
     
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
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.