Examples of tagFile()


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

    RLSeg rlseg = new RLSeg(tag,"./tmpdata/FNLPDATA/all.dict");

    tag.setDictionary(tempdict);

    System.out.println("\n处理文件:");
    String s4 = tag.tagFile("../example-data/data-tag.txt");
    System.out.println(s4);
    String[] toks = s4.split("\\s+");
    int newset = rlseg.update(toks);
    rlseg.close();
View Full Code Here

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

    rlseg.close();

    tag.setDictionary(tempdict);

    System.out.println("\n处理文件:");
    String s = tag.tagFile("../example-data/data-tag.txt");
    System.out.println(s);


  }
View Full Code Here

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

    for(String s:str){
      String t = tag.tag(s);
      System.out.println(t);
    }
   
    String t = tag.tagFile("data/FNLPDATA/seg/bad case.txt");
    System.out.println(t);
   
  }
 
View Full Code Here

Examples of org.fnlp.nlp.cn.tag.NERTagger.tagFile()

    NERTagger tag = new NERTagger("../models/seg.m","../models/pos.m");
    String str = " 新浪体育讯 北京时间4月15日03:00(英国当地时间14日20:00),2009/10赛季英格兰足球超级联赛第34轮一场焦点战在白鹿巷球场展开角逐,阿森纳客场1比2不敌托特纳姆热刺,丹尼-罗斯和拜尔先入两球,本特纳扳回一城。阿森纳仍落后切尔西6分(净胜球少15个),夺冠几成泡影。热刺近 7轮联赛取得6胜,继续以1分之差紧逼曼城。";
    HashMap<String, String> map = new HashMap<String, String>();
    tag.tag(str,map);
    System.out.println(map);
    map = tag.tagFile("../example-data/data-tag.txt");
    System.out.println(map);
    System.out.println("Done!");
  }
}
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.