Package align.data

Examples of align.data.Alignment


    Aligner aligner = new AlignerMock();   
    SimpleTask task =
      new SimpleTask(sourceSplitter, targetSplitter, aligner);
    List<Alignment> alignmentList = task.run("abcd", "efgh");
    assertEquals(1, alignmentList.size());
    Alignment alignment = alignmentList.get(0);
    assertListEquals(new String[]{"a", "b", "c", "d",},
        alignment.getSourceSegmentList());
    assertListEquals(new String[]{"ef", "gh",},
        alignment.getTargetSegmentList());
  }
View Full Code Here


  }
 
  public void testUseDifferentSplitters() throws AlignmentImpossibleException {
    List<Alignment> alignmentList = task.run("abcd", "efgh");
    assertEquals(1, alignmentList.size());
    Alignment alignment = alignmentList.get(0);
    assertListEquals(new String[]{"a", "b", "c", "d",},
        alignment.getSourceSegmentList());
    assertListEquals(new String[]{"ef", "gh",},
        alignment.getTargetSegmentList());
  }
View Full Code Here

    checkManyToZero(runTask(sourceText, targetText));
    checkManyToZero(runTaskFromReaders(sourceText, targetText));
  }
 
  private void checkManyToZero(List<Alignment> alignmentList) {
    Alignment alignment = getOnlyElement(alignmentList);
    assertListEquals(new String[]{"a", "b", "c", "d",},
        alignment.getSourceSegmentList());
    assertListEquals(new String[]{}, alignment.getTargetSegmentList());
  }
View Full Code Here

    checkZeroToMany(runTask(sourceText, targetText));
    checkZeroToMany(runTaskFromReaders(sourceText, targetText));
  }
 
  private void checkZeroToMany(List<Alignment> alignmentList) {
    Alignment alignment = getOnlyElement(alignmentList);
    assertListEquals(new String[]{}, alignment.getSourceSegmentList());
    assertListEquals(new String[]{"ef", "gh",},
        alignment.getTargetSegmentList());
  }
View Full Code Here

TOP

Related Classes of align.data.Alignment

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.