Examples of tag2Array()


Examples of org.fnlp.nlp.cn.tag.CWSTagger.tag2Array()

    while ((line = bfr.readLine()) != null) {
      System.out.println(i++);

      if(line.length()==0)
        continue;
      String[] toks = seg.tag2Array(line);
     
      for(int j=0;j<toks.length;j++){
        bcqa.write(toks[j]);
        if(j<toks.length-1)
        bcqa.write(" ");
View Full Code Here

Examples of org.fnlp.nlp.cn.tag.POSTagger.tag2Array()

   * 只输入句子,不带词性
   * @throws Exception
   */
  private static void test(String word) throws Exception {   
    POSTagger tag = new POSTagger("../models/seg.m","../models/pos.m");
    String[][] s = tag.tag2Array(word);
    try {
      DependencyTree tree = parser.parse2T(s[0],s[1]);
      System.out.println(tree.toString());
      String stree = parser.parse2String(s[0],s[1],true);
      System.out.println(stree);
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.