Examples of SimpleTree

  • com.intellij.ui.treeStructure.SimpleTree
  • com.vaadin.client.SimpleTree
    @author Vaadin Ltd @deprecated as of 7.1. This class was mainly used by the old debug consolebut is retained for now for backwards compatibility.
  • de.timefinder.algo.graph.SimpleTree
    Used for the augmenting tree in KuhnMunkresAlgorithm @author Peter Karich, peat_hal 'at' users 'dot' sourceforge 'dot' net
  • org.apache.ctakes.utils.tree.SimpleTree
  • org.jamesii.core.util.graph.trees.SimpleTree
    This class merely defines a 'simple' tree that has {@link Integer} asvertices, {@link Double} as vertex and edge labels, and both vertices andlabels can be annotated by any {@link Object}. Creation date: 12.12.2006 @author Roland Ewald

  • Examples of org.apache.ctakes.utils.tree.SimpleTree

          for(IdentifiedAnnotation mention : mentions){

            if(lastSent != null && lastSent.getCoveredText().startsWith("Indications")){
              continue;
            }
            SimpleTree tree = AssertionDepUtils.getTokenTreeString(jcas, nodes, mention, UP_NODES);
           
    //        String treeStr = AnnotationDepUtils.getTokenRelTreeString(jcas, nodes, new Annotation[]{mention}, new String[]{"CONCEPT"}, true);
           
            if(tree == null) continue;
            AssertionTreeUtils.replaceDependencyWordsWithSemanticClasses(tree, sems);
            String label = "-1";
           
           
            if(options.attributeType == ATTRIBUTE.NEG && mention.getPolarity() == CONST.NE_POLARITY_NEGATION_PRESENT ||
               options.attributeType == ATTRIBUTE.UNC && mention.getUncertainty() == CONST.NE_UNCERTAINTY_PRESENT){
              label = "+1";
            }
           
            out.print(label);
            out.print(" |BT| ");
            out.print(tree.toString()); //tree.toString());
            out.println(" |ET|");
            out.flush();
    //        // restore cat name:
    //        node2tree.get(headNode).cat = realCat;
    View Full Code Here

    Examples of org.apache.ctakes.utils.tree.SimpleTree

    import org.apache.uima.jcas.tcas.Annotation;

    public class AssertionTreeUtils {

      public static SimpleTree extractAboveLeftConceptTree(JCas jcas, Annotation mention, SemanticClasses sems){
        SimpleTree tree = null;
        TopTreebankNode annotationTree = AnnotationTreeUtils.getAnnotationTree(jcas, mention);
        if(annotationTree != null){
          TopTreebankNode root = AnnotationTreeUtils.getTreeCopy(jcas, annotationTree);
          TreebankNode conceptNode = AnnotationTreeUtils.insertAnnotationNode(jcas, root, mention, "CONCEPT");
          // navigate up the tree to retrieve the first "S" above this node.
    View Full Code Here

    Examples of org.apache.ctakes.utils.tree.SimpleTree

          }
        }
      }

      public static SimpleTree extractAboveRightConceptTree(JCas jcas, Annotation mention, SemanticClasses sems){
        SimpleTree tree = null;
        TopTreebankNode annotationTree = AnnotationTreeUtils.getAnnotationTree(jcas, mention);
        if(annotationTree != null){
          TopTreebankNode root = AnnotationTreeUtils.getTreeCopy(jcas, annotationTree);
          TreebankNode conceptNode = AnnotationTreeUtils.insertAnnotationNode(jcas, root, mention, "CONCEPT");
          //            SimpleTree tree = null;
    View Full Code Here

    Examples of org.apache.ctakes.utils.tree.SimpleTree

    import org.apache.uima.jcas.tcas.Annotation;

    public class AssertionTreeUtils {

      public static SimpleTree extractAboveLeftConceptTree(JCas jcas, Annotation mention, SemanticClasses sems){
        SimpleTree tree = null;
        TopTreebankNode annotationTree = AnnotationTreeUtils.getAnnotationTree(jcas, mention);
        if(annotationTree != null){
          TopTreebankNode root = AnnotationTreeUtils.getTreeCopy(jcas, annotationTree);
          TreebankNode conceptNode = AnnotationTreeUtils.insertAnnotationNode(jcas, root, mention, "CONCEPT");
          // navigate up the tree to retrieve the first "S" above this node.
    View Full Code Here

    Examples of org.apache.ctakes.utils.tree.SimpleTree

        }
        return tree;
      }
     
      public static SimpleTree extractAboveRightConceptTree(JCas jcas, Annotation mention, SemanticClasses sems){
        SimpleTree tree = null;
        TopTreebankNode annotationTree = AnnotationTreeUtils.getAnnotationTree(jcas, mention);
        if(annotationTree != null){
          TopTreebankNode root = AnnotationTreeUtils.getTreeCopy(jcas, annotationTree);
          TreebankNode conceptNode = AnnotationTreeUtils.insertAnnotationNode(jcas, root, mention, "CONCEPT");
          //            SimpleTree tree = null;
    View Full Code Here

    Examples of org.apache.ctakes.utils.tree.SimpleTree

          TopTreebankNode orig = AnnotationTreeUtils.getAnnotationTree(jcas, mention);
          if(orig == null){
            log.warn("Tree for entity mention: " + mention.getCoveredText() + " (" + mention.getBegin() + "-" + mention.getEnd() + ") is null.");
            continue;
          }
          SimpleTree tree = extractAboveLeftConceptTree(jcas, mention, sems);
    //      if(mention.getPolarity() == CONST.NE_POLARITY_NEGATION_PRESENT){
          if(mention.getUncertainty() == CONST.NE_UNCERTAINTY_PRESENT){
            out.print("+1 ");
          }else{
            out.print("-1 ");
          }
         
          out.print("|BT| ");
          out.print(tree.toString());
          out.println(" |ET|");
          out.flush();
        }
      }
    View Full Code Here

    Examples of org.apache.ctakes.utils.tree.SimpleTree

        // 2) overlapping trees
        if(t1 == t2 || (t1.getBegin() >= t2.getBegin() && t1.getEnd() <= t2.getEnd()) || (t2.getBegin() >= t1.getBegin() && t2.getEnd() <= t1.getEnd())){
          return sameTree(t1, t2);
        }
       
        SimpleTree node = null;
        TreebankNode lca = getLCA(t1, t2);
        if(lca == null) node = new SimpleTree("TOP");
        else node = new SimpleTree(lca.getNodeType());
       
        ArrayList<TreebankNode> antePath = getUpwardPath(lca, t1);
        SimpleTree parent = node;
        for(TreebankNode child : antePath){
          SimpleTree newChild = new SimpleTree(child.getNodeType());
          parent.addChild(newChild);
          parent = newChild;   
        }
        parent.addChild(new SimpleTree("arg1"));
       
        ArrayList<TreebankNode> anaPath = getUpwardPath(lca, t2);
        parent = node;
        for(TreebankNode child : anaPath){
          SimpleTree newChild = new SimpleTree(child.getNodeType());
          parent.addChild(newChild);
          parent = newChild;
        }
        parent.addChild(new SimpleTree("arg2"));
       
        return node;
      }
    View Full Code Here

    Examples of org.apache.ctakes.utils.tree.SimpleTree

       
        return node;
      }

      public static SimpleTree extractPathEnclosedTree(TreebankNode t1, TreebankNode t2, JCas jcas){
        SimpleTree node = null;
        // swap them if wrong order:
        if(t1.getBegin() > t2.getBegin()){
          TreebankNode temp = t1;
          t1 = t2;
          t2 = temp;
    View Full Code Here

    Examples of org.apache.ctakes.utils.tree.SimpleTree

        }
        return node;
      }

      private static SimpleTree buildSimpleClonePET(TreebankNode lca, TreebankNode t1, TreebankNode t2){
        SimpleTree t = new SimpleTree(lca.getNodeType());
        if(lca instanceof TerminalTreebankNode){
          t.addChild(new SimpleTree(lca.getNodeValue()));
        }else{
          for(int i = 0; i < lca.getChildren().size(); i++){
            TreebankNode tn = lca.getChildren(i);
            if(tn.getEnd() > t1.getBegin() && tn.getBegin() < t2.getEnd()){
              t.addChild(buildSimpleClonePET(lca.getChildren(i), t1, t2));
            }
          }
        }
        return t;
      }
    View Full Code Here

    Examples of org.apache.ctakes.utils.tree.SimpleTree

    //    node.setChildren(1,pt2);
    //    return node;
    //  }
     
      private static SimpleTree sameTree(TreebankNode t1, TreebankNode t2){
        SimpleTree node = new SimpleTree(t1.getNodeType());
        node.addChild(new SimpleTree("ANTECEDENT"));
        node.children.get(0).addChild(new SimpleTree("antecedent"));
        node.addChild(new SimpleTree("ANAPHOR"));
        node.children.get(1).addChild(new SimpleTree("anaphor"));
        return node;
      }
    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.