Examples of LFEdgeLabel


Examples of opennlp.ccg.hylo.graph.LFEdgeLabel

  public void setUp() throws Exception {
    super.setUp();
   
    edge = new LFEdge(new LFVertex(new NominalAtom("w0"), new Proposition("blah")),
        new LFVertex(new NominalAtom("w1"), new Proposition("blah blah")),
        new LFEdgeLabel(new ModeLabel("blase")));
   
    filter = new EdgeMatchFilter(edge, MatchType.LABEL_MISMATCH, MatchType.SOURCE_PREDICATE_MISMATCH,
        MatchType.TARGET_PREDICATE_MATCH);
  }
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFEdgeLabel

 
  @Test
  public void testAllows() {
    LFEdge test = new LFEdge(new LFVertex(new NominalAtom("w0"), new Proposition("blah blah")),
        new LFVertex(new NominalAtom("w1"), new Proposition("blah blah")),
        new LFEdgeLabel(new ModeLabel("boring")));
   
    assertTrue(filter.allows(test));
   
    test = new LFEdge(test.getSource(), test.getTarget(), edge.getLabel());
    assertFalse(filter.allows(test));
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFEdgeLabel

  public void setUp() throws Exception {
    super.setUp();
   
    one = new LFEdge(new LFVertex(new NominalAtom("w0"), new Proposition("blah")),
        new LFVertex(new NominalAtom("w1"), new Proposition("blah blah")),
        new LFEdgeLabel(new ModeLabel("blase")));
    two = new LFEdge(new LFVertex(new NominalAtom("w2"), new Proposition("blah")),
        new LFVertex(new NominalAtom("w3"), new Proposition("blah blah")),
        new LFEdgeLabel(new ModeLabel("blurg")));
   
    label = new LFEdgeLabel(new ModeLabel("blase"));
   
    filter = new LabelMatchFilter(label);
  }
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFEdgeLabel

    }
  }

  @Test
  public void testSetBasis() {
    filter.setBasis(new LFEdgeLabel(new ModeLabel("boo")));
   
    assertFalse(filter.allows(one));
    assertFalse(filter.allows(two));
   
    try {
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFEdgeLabel

  @SuppressWarnings("unchecked")
  @Test
  public void testAllows() {
    LFEdge one = new LFEdge(new LFVertex(new NominalAtom("w0"), new Proposition("blah")),
        new LFVertex(new NominalAtom("w1"), new Proposition("blah blah")),
        new LFEdgeLabel(new ModeLabel("blase"))),
      two = new LFEdge(new LFVertex(new NominalAtom("w2"), new Proposition("blah")),
        new LFVertex(new NominalAtom("w3"), new Proposition("blah blah")),
        new LFEdgeLabel(new ModeLabel("blase")));
   
    assertTrue(filter.allows(one));
    assertFalse(filter.allows(two));
   
    filter.setAlignmentIndices(Collections.EMPTY_SET);
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFEdgeLabel

    one = new LFVertex(new NominalAtom("w0"), new Proposition("blah"));
    two = new LFVertex(new NominalAtom("w1"), new Proposition("blah"));
   
    edge = new LFEdge(two,
        new LFVertex(new NominalAtom("w2"), new Proposition("blah blah")),
        new LFEdgeLabel(new ModeLabel("blase")));
   
    filter = new VertexMatchFilter(two, MatchType.SOURCE_MATCH);
  }
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFEdgeLabel

  public void setUp() throws Exception {
    super.setUp();
   
    one = new LFEdge(new LFVertex(new NominalAtom("w0"), new Proposition("blah")),
        new LFVertex(new NominalAtom("w1"), new Proposition("blah blah")),
        new LFEdgeLabel(new ModeLabel("blase")));
    two = new LFEdge(new LFVertex(new NominalAtom("w2"), new Proposition("blah")),
        new LFVertex(new NominalAtom("w3"), new Proposition("blah blah")),
        new LFEdgeLabel(new ModeLabel("bored")));
    three = new LFEdge(new LFVertex(new NominalAtom("w0"), new Proposition("zzz")),
        new LFVertex(new NominalAtom("w2"), new Proposition("snooze")),
        new LFEdgeLabel(new ModeLabel("blase")));
   
    edges = new LinkedHashSet<LFEdge>();
    edges.add(one);
    edges.add(two);
    edges.add(three);
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFEdgeLabel

    }
  }
 
  private void processDifferentPredicates(DLFContext context, LFEdge outgoing,
      Set<LFVertex> differentPredicates) {
    LFEdgeLabel label = outgoing.getLabel();
   
    boolean terminal = context.getGraph().outDegreeOf(context.vertex) == 0;
    if(!terminal) {
      terminal = !new FilteredSet<LFVertex>(
              differentPredicates, new TerminalFilter(graphDifference.b))
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFEdgeLabel

    }
  }
 
  private void processSingletonDifferentPredicate(DLFContext context, LFEdge outgoing,
      LFVertex differentPredicate) {
    LFEdgeLabel label = outgoing.getLabel();
   
    // add relation, then choice point
    Element newRel = addRelation(context, label);
    context.parent = newRel;
    Element choiceElement = addChoice(context);
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFEdgeLabel

    newRel.replaceChild(targetElement, choiceElement);
  }
 
  private void processMultipleDifferentPredicates(DLFContext context, LFEdge outgoing,
      Set<LFVertex> differentPredicates) {
    LFEdgeLabel label = outgoing.getLabel();
   
    // generate the choice point
    Element choiceElement = addChoice(context);
    context.parent = choiceElement;
   
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.