Package org.fnlp.nlp.cn.Chars

Examples of org.fnlp.nlp.cn.Chars.StringType


      if(j<len-1 && tags[j]==CharType.L && tags[j+1]==CharType.L){//当前是连续英文
        continue;
      }else if(j<len-1 &&tags[j]==CharType.D && tags[j+1]==CharType.D){//当前是连续数字
        continue;
      }
      StringType st = Chars.char2StringType(tags[j]);
      String w = sent.substring(begin,j+1);
      words.add(w);
      types.add(st.toString());
      begin = j+1;
    }   
    String[][] data = new String[2][];
    data[0] = words.toArray(new String[words.size()]);
    data[1] = types.toArray(new String[types.size()]);
View Full Code Here


    sb.append(':');
    sb.append(pos);
    sb.append(':');
   
    String str = data[0][pos]; //这里数据行列和模板中行列相反
    StringType type = Chars.getStringType(str);
    String stype = type.name();
   
    if(type == StringType.M){
     
      if(str.length()>4 && str.startsWith("http:"))
        stype = "U$";
View Full Code Here

TOP

Related Classes of org.fnlp.nlp.cn.Chars.StringType

Copyright © 2018 www.massapicom. 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.