Package edu.stanford.nlp.ling

Examples of edu.stanford.nlp.ling.CyclicCoreLabel.keySet()


   *         label arcs between this node and <code>destNode</code>
   */
  public Set<Class<? extends GrammaticalRelationAnnotation>> arcLabelsToNode(TreeGraphNode destNode) {
    Set<Class<? extends GrammaticalRelationAnnotation>> arcLabels = Generics.newHashSet();
    CyclicCoreLabel cl = label();
    for (Iterator<Class<?>> it = cl.keySet().iterator(); it.hasNext();) {
      Class<? extends CoreAnnotation> key = (Class<? extends CoreAnnotation>) it.next();//javac doesn't compile properly if generics are fully specified (but eclipse does...)
      Object val = cl.get(key);
      if (val != null && val instanceof Set) {
        if (((Set) val).contains(destNode)) {
          if (key != null) {
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.