Package edu.stanford.nlp.ling

Examples of edu.stanford.nlp.ling.HasIndex.index()


        afl.set(CoreAnnotations.IndexAnnotation.class, startIndex);
      }*/

      if(label() instanceof HasIndex) {
        HasIndex hi = (HasIndex) label();
        int oldIndex = hi.index();
        if (!overWrite && oldIndex >= 0) {
          startIndex = oldIndex;
        } else {
          hi.setIndex(startIndex);
        }
View Full Code Here


      @Override
      public int compare(Dependency dep1, Dependency dep2) {
        HasIndex dep1lab = (HasIndex) dep1.dependent();
        HasIndex dep2lab = (HasIndex) dep2.dependent();
        int dep1idx = dep1lab.index();
        int dep2idx = dep2lab.index();
        return dep1idx - dep2idx;
      }

    }
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.