Examples of TNode


Examples of edu.isi.karma.cleaning.TNode

      } else if (t.getType() == 12) {
        mytype = TNode.SYBSTYP;
      } else if (t.getType() == 9) {
        mytype = TNode.LWRDTYP;
      }
      TNode tx = new TNode(mytype, t.getText());
      x.add(tx);
      t = tk.nextToken();
    }
    return x;
  }
View Full Code Here

Examples of edu.isi.karma.cleaning.TNode

        "?", "<", ">", "." };
    Vector<CntFeature> cntfs = new Vector<CntFeature>(symbol.length);
    // moving feature
    Vector<MovFeature> movfs = new Vector<MovFeature>(symbol.length);
    for (int i = 0; i < symbol.length; i++) {
      TNode t = new TNode(TNode.SYBSTYP, symbol[i]);
      Vector<TNode> li = new Vector<TNode>();
      li.add(t);
      cntfs.add(i, new CntFeature(this.otokenseqs, this.tokenseqs, li));
      cntfs.get(i).setName("entr_cnt_" + symbol[i]);
      movfs.add(i, new MovFeature(this.otokenseqs, this.tokenseqs, li));
      movfs.get(i).setName("entr_mov" + symbol[i]);
    }
    // count the blank, symbol wrd and number token
    TNode t = new TNode(TNode.BNKTYP, TNode.ANYTOK);
    Vector<TNode> li = new Vector<TNode>();
    li.add(t);
    CntFeature cf = new CntFeature(this.otokenseqs, this.tokenseqs, li);
    cf.setName("entr_cnt_bnk");
    TNode t1 = new TNode(TNode.SYBSTYP, TNode.ANYTOK);
    Vector<TNode> li1 = new Vector<TNode>();
    li1.add(t1);
    CntFeature cf1 = new CntFeature(this.otokenseqs, this.tokenseqs, li1);
    cf1.setName("entr_cnt_syb");
    TNode t2 = new TNode(TNode.LWRDTYP, TNode.ANYTOK);
    Vector<TNode> li2 = new Vector<TNode>();
    li2.add(t2);
    CntFeature cf2 = new CntFeature(this.otokenseqs, this.tokenseqs, li2);
    cf2.setName("entr_cnt_lwrd");
    TNode t3 = new TNode(TNode.NUMTYP, TNode.ANYTOK);
    Vector<TNode> li3 = new Vector<TNode>();
    li3.add(t3);
    CntFeature cf3 = new CntFeature(this.otokenseqs, this.tokenseqs, li3);
    cf3.setName("entr_cnt_num");
    /*
 
View Full Code Here

Examples of edu.isi.karma.cleaning.TNode

  public void readRecord(String ID, Vector<TNode> record) {
    HashMap<String, Integer> curIndices = new HashMap<String, Integer>();
    for (int i = 1; i < record.size() - 1; i++) // skip the start and end
                          // token
    {
      TNode t = record.get(i);
      String type = t.getType();
      String anchor = type;
      if (curIndices.containsKey(type)) {
        int cnt = curIndices.get(type);
        curIndices.put(type, cnt + 1);
        anchor += cnt;
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.