Package org.fnlp.nlp.cn.anaphora

Examples of org.fnlp.nlp.cn.anaphora.EntityGroup


              bl1 = true;
              break;
            }
          }
          if(bl1){
            list.add(new Instance(new EntityGroup(et1,et),flag));
          }
        }
        etLL = new LinkedList<Entity>();
        etLL.add(et);
      }
View Full Code Here


    else
      return null;
  }
  public static void main(String args[]) throws IOException{
    FileGroupReader fgr = new FileGroupReader("F:\\媒体 学习\\研一(下)\\cc");
    EntityGroup eg=null;Instance in = null;int i = 0;int j = 0;
    while(!fgr.list.isEmpty())
    { in=  fgr.list.poll();eg=(EntityGroup) in.getData();
      if(in.getTarget().toString().equals("1")){i++;
      }
      else
View Full Code Here

  private LinkedList<EntityGroup> doIt(LinkedList<Entity> entityList, LinkedList<EntityGroup> arGroup){
    LinkedList<Entity> ll =null;
    int flag = 0;Entity re =null;Entity re1 =null;
    int i = entityList.size();int j =0;
    WeightGetter wp = null;
    EntityGroup reg =null;
    EntityGroup reg1 =null;
    while(flag!=i-j){
      flag =0;
      ll = new LinkedList<Entity>();
      Iterator<Entity> it = entityList.iterator();
      while(it.hasNext()){
        flag++;
        re = it.next();
        if(!re.getPosTag().isPronoun()){
          ll.add(re);
        }
        else{
          j++;
          it.remove();
          break;
        }         
      }
      if(flag==i-j&&!re.getPosTag().isPronoun())
        break;
      it = ll.iterator();
      int ii = -100;
      while(it.hasNext()){
        re1 = it.next();     
        reg = new EntityGroup(re1,re);
        wp = new WeightGetter(reg);
        if(wp.getWeight()>=ii){
          ii = wp.getWeight();
          reg1 =reg;
          reg1.weight = ii;
View Full Code Here

TOP

Related Classes of org.fnlp.nlp.cn.anaphora.EntityGroup

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.