Package edu.umd.hooka.ttables

Examples of edu.umd.hooka.ttables.TTable_monolithic.normalize()


    TTable_monolithic tc = (TTable_monolithic)tt.clone(); tc.clear();
    ATable ac = (ATable)at.clone(); ac.clear();
    hmm.addPartialTranslationCountsToTTable(tc);
    hmm.addPartialJumpCountsToATable(ac);
    System.out.println("COUNTS:\n" + tc);
    tc.normalize();
    ac.normalize();
    System.out.println("OLD:\n" + at);
    System.out.println("NEW:\n" + ac);
    System.out.println("\nnew:\n"+tc);
    //if (true) return;
View Full Code Here


    //int[] fw = {2, 1, 2};
    int[] ew = {2, 1, 1, 1, 2};
    Phrase f = new Phrase(fw, 1);
    Phrase e = new Phrase(ew, 1);
    PhrasePair pp = new PhrasePair(f, e);
    tt.normalize();
    hmm = new HMM(tt, at);
    hmm.buildHMMTables(pp);
    PerplexityReporter cr = new PerplexityReporter();
    Alignment a = hmm.viterbiAlign(pp, cr);
    assertEquals(a.getELength(), e.size());
View Full Code Here

    TTable_monolithic tc = (TTable_monolithic)tt.clone(); tc.clear();
    ATable ac = (ATable)at.clone(); ac.clear();
    hmm.addPartialTranslationCountsToTTable(tc);
    hmm.addPartialJumpCountsToATable(ac);
    System.out.println("COUNTS:\n" + tc);
    tc.normalize();
    ac.normalize();
   
    PerplexityReporter cr = new PerplexityReporter();
    Alignment a = hmm.viterbiAlign(pp, cr);
    assertEquals(a.getELength(), e.size());
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.