Package org.maltparserx.core.syntaxgraph.node

Examples of org.maltparserx.core.syntaxgraph.node.DependencyNode.findComponent()


        DependencyNode rightNode = covingtonConfig.getRightTarget();
        left--;
        DependencyNode leftNode = null;
        while (left >= leftstop) {
          leftNode = covingtonConfig.getInput().get(left);
          if (rightNode.findComponent().getIndex() != leftNode.findComponent().getIndex()) {
            break;
          }
          left--;
        }
      }
View Full Code Here


      int left = covingtonConfig.getLeft();
      left--;
      DependencyNode leftNode = null;
      while (left >= leftstop) {
        leftNode = covingtonConfig.getInput().get(left);
        if (rightNode.findComponent().getIndex() != leftNode.findComponent().getIndex() &&
            !(leftNode.hasHead() && rightNode.hasHead())) {
          break;
        }
        left--;
      }
View Full Code Here

        return false;
      //avoid two links being created from and to the same node
      if ( stackPeek.hasHead() && dg.getTokenNode(stackPeek.getIndex()).getHead().getIndex() == inputPeek.getIndex() )
        return false;
      //enforce acyclicity constraint if present
      if ( acyclicityConstraint && stackPeek.findComponent().getIndex() == inputPeek.findComponent().getIndex() )
        return false;
    }
    if (trans == RIGHTARC) {
      //enforce single-head constraint if present
      if ( inputPeek.hasHead() && singleHeadConstraint )
View Full Code Here

        return false;
      //avoid two links being created from and to the same node
      if ( inputPeek.hasHead() && dg.getTokenNode(inputPeek.getIndex()).getHead().getIndex() == stackPeek.getIndex() )
        return false;
      //enforce acyclicity constraint if present
      if ( acyclicityConstraint && stackPeek.findComponent().getIndex() == inputPeek.findComponent().getIndex() )
        return false;
    }
    if (trans == REDUCE) {
      //do not reduce the dummy root
      if ( stackPeek.isRoot() )
View Full Code Here

      //if ( !stackPeek.hasHead() && rootHandling == PlanarConfig.STRICT )
      //  return false;
      //enforce connectedness constraint if present
      if ( connectednessConstraintOnReduce )
      {
        boolean path1 = ( stackPeek.findComponent().getIndex() == inputPeek.findComponent().getIndex() );
        boolean path2;
        if ( planarConfig.getStack().size() < 2 ) path2=false;
        else
        {
          DependencyNode stackPrev = planarConfig.getStack().get(planarConfig.getStack().size()-2);
View Full Code Here

        boolean path2;
        if ( planarConfig.getStack().size() < 2 ) path2=false;
        else
        {
          DependencyNode stackPrev = planarConfig.getStack().get(planarConfig.getStack().size()-2);
          path2 = stackPrev.findComponent().getIndex() == stackPeek.findComponent().getIndex();
        }
        return path1 || path2;
      }
    }
    if ( trans == SHIFT )
View Full Code Here

        return false;
      //avoid two links being created from and to the same node
      if ( activeStackPeek.hasHead() && dg.getTokenNode(activeStackPeek.getIndex()).getHead().getIndex() == inputPeek.getIndex() )
        return false;
      //enforce acyclicity constraint if present
      if ( acyclicityConstraint && activeStackPeek.findComponent().getIndex() == inputPeek.findComponent().getIndex() )
        return false;
    }
    if (trans == RIGHTARC) {
      //enforce single-head constraint if present
      if ( inputPeek.hasHead() && singleHeadConstraint )
View Full Code Here

        return false;
      //avoid two links being created from and to the same node
      if ( inputPeek.hasHead() && dg.getTokenNode(inputPeek.getIndex()).getHead().getIndex() == activeStackPeek.getIndex() )
        return false;
      //enforce acyclicity constraint if present
      if ( acyclicityConstraint && activeStackPeek.findComponent().getIndex() == inputPeek.findComponent().getIndex() )
        return false;
    }
    if (trans == REDUCE) {
      //do not reduce the dummy root
      if ( activeStackPeek.isRoot() )
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.