Examples of ModifyAlgorithm


Examples of net.sourceforge.align.filter.modifier.modify.ModifyAlgorithm

    sourceVocabulary = VocabularyUtil.createTruncatedVocabulary(
        sourceWidList, sourceVocabulary);
    targetVocabulary = VocabularyUtil.createTruncatedVocabulary(
        targetWidList, targetVocabulary);

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

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

Examples of net.sourceforge.align.filter.modifier.modify.ModifyAlgorithm

  protected void run(CommandLine commandLine) {
    String cls = commandLine.getOptionValue('c');
    if (cls == null) {
      throw new MissingParameterException("class");
    }
    ModifyAlgorithm sourceAlgorithm;
    ModifyAlgorithm targetAlgorithm = null;
    Parser parser = new AlParser(getIn());
    List<Alignment> alignmentList = null;
    if (cls.equals("split-word")) {
      sourceAlgorithm = new WordSplitAlgorithm();
    } else if (cls.equals("split-sentence")) {
View Full Code Here

Examples of net.sourceforge.align.filter.modifier.modify.ModifyAlgorithm

        maxWordCount, minOccurenceCount);
    targetVocabulary = VocabularyUtil.createTruncatedVocabulary(
        targetWidList, targetVocabulary,
        maxWordCount, minOccurenceCount);

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

    return new Pair<ModifyAlgorithm, ModifyAlgorithm>(
        sourceAlgorithm, targetAlgorithm);
  }
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.