Package net.sourceforge.align.filter.modifier

Examples of net.sourceforge.align.filter.modifier.Modifier


    ModifyAlgorithm sourceAlgorithm =
      new UnifyRareWordsCleanAlgorithm(sourceVocabulary);
    ModifyAlgorithm targetAlgorithm =
      new UnifyRareWordsCleanAlgorithm(targetVocabulary);

    Filter filter = new Modifier(sourceAlgorithm, targetAlgorithm);
   
    return filter.apply(alignmentList);
   
  }
View Full Code Here


      throw new UnknownParameterException("part");
    }
   
    Formatter formatter = new AlFormatter(getOut());
   
    Filter filter = new Modifier(sourceAlgorithm, targetAlgorithm);
    filter = FilterDecorators.decorate(filter);

    if (alignmentList == null) {
      alignmentList = parser.parse();
    }
   
    alignmentList = filter.apply(alignmentList);
    formatter.format(alignmentList);
  }
View Full Code Here

  public void testRunAllFilters() {
    SplitAlgorithm splitAlgorithm = new SplitAlgorithmMock(1);
    AlignAlgorithm alignAlgorithm = new AlignAlgorithmMock(2);
    MergeAlgorithm mergeAlgorithm = new SeparatorMergeAlgorithm();
    List<Filter> filterList = new ArrayList<Filter>();
    filterList.add(new Modifier(splitAlgorithm, splitAlgorithm));
    filterList.add(new Aligner(alignAlgorithm));
    filterList.add(new Modifier(mergeAlgorithm, mergeAlgorithm));
    CompositeFilter composite = new CompositeFilter(filterList);
    List<Alignment> alignmentList = createAlignmentList(
        SOURCE_SEGMENT_ARRAY, TARGET_SEGMENT_ARRAY);
    List<Alignment> resultAlignmentList = composite.apply(alignmentList);
    assertAlignmentListEquals(EXPECTED_SOURCE_SEGMENT_ARRAY,
View Full Code Here

TOP

Related Classes of net.sourceforge.align.filter.modifier.Modifier

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.