Examples of ChineseTrans


Examples of org.fnlp.nlp.cn.ChineseTrans

    in.close();
    out.close();
  }

  private static void toSimp() throws IOException {
    ChineseTrans ct = new ChineseTrans();

   
    BufferedReader in = new BufferedReader(new InputStreamReader(
        new FileInputStream(infile ), "utf8"));

    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(
        simpfile), "utf8"));

    String line = null
    int count=0;
    while ((line = in.readLine()) != null) {
      if(line.length()==0){
       
      }else if(line.startsWith("<doc")){
        count++;       
      }else if(line.startsWith("</doc>")){
        count--;
      }else{
        line = ct.toSimp(line);       
      }
      out.append(line);
      out.append("\n");
    }
    System.out.println(count);
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.