Package opennlp.ccg.disjunctivizer

Examples of opennlp.ccg.disjunctivizer.AlignedEdgeFilter


    indices = new HashSet<Integer>();
    indices.add(0);
    indices.add(2);
    indices.add(3);
   
    filter = new AlignedEdgeFilter(indices, MatchType.SOURCE_ALIGNED, MatchType.TARGET_UNALIGNED);
  }
View Full Code Here


  }
 
  @Test
  public void testAlignedEdgeFilter() {
    try {
      new AlignedEdgeFilter(null, MatchType.SOURCE_ALIGNED);
      fail("able to specify null alignment indices");
    }
    catch(IllegalArgumentException expected) {
      // do nothing
    }
View Full Code Here

    filter.setAlignmentIndices(Collections.EMPTY_SET);
    assertFalse(filter.allows(one));
    assertFalse(filter.allows(two));
   
    // make self-contradictory filter
    filter = new AlignedEdgeFilter(indices, MatchType.SOURCE_ALIGNED, MatchType.SOURCE_UNALIGNED);
    assertFalse(filter.allows(one));
    assertFalse(filter.allows(two));
  }
View Full Code Here

    indices.add(0);
    indices.add(2);
    indices.add(3);
   
    edgeFilter = new CompositeFilter<LFEdge>(new EdgeMatchFilter(one, MatchType.SOURCE_PREDICATE_MATCH,
        MatchType.LABEL_MISMATCH), new AlignedEdgeFilter(indices,
            MatchType.TARGET_ALIGNED, MatchType.SOURCE_ALIGNED));
   
    set = new FilteredLFEdgeSet(edges, edgeFilter);
  }
View Full Code Here

TOP

Related Classes of opennlp.ccg.disjunctivizer.AlignedEdgeFilter

Copyright © 2018 www.massapicom. 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.