Package net.sourceforge.align.calculator.length.counter

Examples of net.sourceforge.align.calculator.length.counter.Counter


   * Constructs algorithm object. It is similar to Gale and Church algorithm
   * but based on Forward Backward method instead of Viterbi method.
   */
  @Before
  public void setUp() {
    Counter counter = new CharCounter();
    Calculator calculator = new NormalDistributionCalculator(counter);
    MatrixFactory matrixFactory = new FullMatrixFactory();
   
    algorithm = new ForwardBackwardAlgorithm(calculator,
        CategoryDefaults.BEST_CATEGORY_MAP, matrixFactory);
View Full Code Here


*/
public class PoissonMacro implements Macro {

  public List<Alignment> apply(List<Alignment> alignmentList) {
   
    Counter counter = new SplitCounter();
    Calculator calculator =
      new PoissonDistributionCalculator(counter, alignmentList);
   
    HmmAlignAlgorithmFactory algorithmFactory =
      new ForwardBackwardAlgorithmFactory();
View Full Code Here

    return algorithm;
  }
   
  private Counter createCounter(CommandLine commandLine) {
    String ctr = commandLine.getOptionValue('n');
    Counter counter;
    if (ctr == null) {
      counter = null;
    } else if (ctr.equals("word")) {
      counter = new SplitCounter();
    } else if (ctr.equals("char")) {
View Full Code Here

    return calculator;
  }
 
 
  private Calculator createNormalCalculator(CommandLine commandLine) {
    Counter counter = createCounter(commandLine);
    if (counter == null) {
      throw new MissingParameterException("counter");
    }
    Calculator calculator = new NormalDistributionCalculator(counter);
    return calculator;
View Full Code Here

    return calculator;
  }

  private Calculator createPoissonCalculator(CommandLine commandLine,
      List<Alignment> alignmentList) {
    Counter counter = createCounter(commandLine);
    if (counter == null) {
      throw new MissingParameterException("counter");
    }
    String lengthCorpus = commandLine.getOptionValue('l');
    List<Alignment> lengthAlignmentList;
View Full Code Here

   */
  private List<Alignment> lengthAlign(List<Alignment> alignmentList) {

    List<Filter> filterList = new ArrayList<Filter>();
   
    Counter counter = new CharCounter();
    Calculator calculator = new NormalDistributionCalculator(counter);
   
    HmmAlignAlgorithmFactory algorithmFactory =
      new ForwardBackwardAlgorithmFactory();
   
View Full Code Here

   */
  private List<Alignment> lengthAlign(List<Alignment> alignmentList) {

    List<Filter> filterList = new ArrayList<Filter>();
   
    Counter counter = new SplitCounter();
    Calculator calculator =
      new PoissonDistributionCalculator(counter, alignmentList);
   
    HmmAlignAlgorithmFactory algorithmFactory =
      new ForwardBackwardAlgorithmFactory();
View Full Code Here

  private List<Alignment> contentAlign(List<Alignment> alignmentList,
      List<Alignment> bestAlignmentList) {
   
    List<Calculator> calculatorList = new ArrayList<Calculator>();
   
    Counter counter = new SplitCounter();
    calculatorList.add(new PoissonDistributionCalculator(counter, alignmentList));
   
    calculatorList.add(new TranslationCalculator(bestAlignmentList));

    Calculator calculator = new CompositeCalculator(calculatorList);
View Full Code Here

*/
public class GaleAndChurchMacro implements Macro {

  public List<Alignment> apply(List<Alignment> alignmentList) {
   
    Counter counter = new CharCounter();
    Calculator calculator = new NormalDistributionCalculator(counter);
   
    HmmAlignAlgorithmFactory algorithmFactory =
      new ViterbiAlgorithmFactory();
   
View Full Code Here

   * method to the one used in {@link PoissonMacro}).
   * @param alignmentList input alignment list
   * @return aligned list
   */
  private List<Alignment> lengthAlign(List<Alignment> alignmentList) {
    Counter counter = new SplitCounter();
    Calculator calculator =
      new PoissonDistributionCalculator(counter, alignmentList);
   
    HmmAlignAlgorithmFactory algorithmFactory =
      new ForwardBackwardAlgorithmFactory();
View Full Code Here

TOP

Related Classes of net.sourceforge.align.calculator.length.counter.Counter

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.