Examples of GornAddress


Examples of synalp.commons.derivations.GornAddress

    {
      Node foot = entry.getTree().getFoot();
      if (foot != null && foot.hasCategory(category))
      {
        Node anchor = entry.getTree().getMainAnchor();
        GornAddress footAddress = GornAddress.getAddress(foot, entry.getTree());
        GornAddress anchorAddress = GornAddress.getAddress(anchor, entry.getTree());
        boolean leftOf = footAddress.isLeftOf(anchorAddress);
        if (footType == FootType.LEFT && leftOf)
          ret.add(entry);
        if (footType == FootType.RIGHT && !leftOf)
          ret.add(entry);
View Full Code Here

Examples of synalp.commons.derivations.GornAddress

    n1.addChild(n2);
    n1.addChild(n3);

    // 0:root ( 0.0:n1 ( 0.0.0:n2 0.0.1:n3 ) )

    assertNull(tree.getNode(new GornAddress(0, 1)));
    assertNotNull(tree.getNode(new GornAddress(0, 0, 0)));
  }
View Full Code Here

Examples of synalp.commons.derivations.GornAddress

    n1.addChild(n2);
    n1.addChild(n3);

    // 0:root ( 0.0:n1 ( 0.0.0:n2 0.0.1:n3 ) )

    assertEquals(GornAddress.getAddress(n1, tree), new GornAddress(0, 0));
    assertEquals(GornAddress.getAddress(n2, tree), new GornAddress(0, 0, 0));
    assertEquals(GornAddress.getAddress(n3, tree), new GornAddress(0, 0, 1));
  }
View Full Code Here

Examples of synalp.commons.derivations.GornAddress

   * Test address leftOf method.
   */
  @Test
  public void testLeftOf()
  {
    assertTrue(new GornAddress(0, 0, 1).isLeftOf(new GornAddress(0, 0, 2)));
  }
View Full Code Here

Examples of translation.trees.GornAddress

    for (ElementaryTree tree : sourceTrees)
      if (tree.getRootCat().equals(getDottedNode().getCat()) &&
          (! tree.isAuxiliary())) {
        Item it =
          new Item(tree, new GornAddress(),
              DotPos.LEFT_ABOVE, currentStateNum);
        it.addContextItem(this);
        newItems.add(it);
      }
    return newItems;
View Full Code Here

Examples of translation.trees.GornAddress

    for (ElementaryTree tree : sourceTrees)
      if (tree.getRootCat().equals(getDottedNode().getCat())
          && getTree().getAuxType() == AuxType.LEFT_ADJTYPE) {
        Item adjoinable =
          new Item(tree, new GornAddress(),
              DotPos.LEFT_ABOVE, currentStateNum);

        adjoinable.addContextItem(this);
        newItems.add(adjoinable);
      }
View Full Code Here

Examples of translation.trees.GornAddress

  public void buildInitialItems() {
    for (ElementaryTree tree : sourceTrees)
      if (tree.getRootCat().equals("S")) {
        Item it = new Item(
            tree,
            new GornAddress(), //dot=0. Pas tree.getRootAddress()!
            DotPos.LEFT_ABOVE,
            0);
        items.add(it);
      }
  }
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.