Examples of PhrasePair


Examples of edu.umd.hooka.PhrasePair

    int[] fw = {2, 1, 2, 3};
    //int[] fw = {2, 1, 2};
    int[] ew = {1, 2, 1};
    Phrase f = new Phrase(fw, 1);
    Phrase e = new Phrase(ew, 1);
    PhrasePair pp = new PhrasePair(f, e);
    hmm = new HMM(tt, at);
    hmm.buildHMMTables(pp);
    hmm.baumWelch(pp, null);
    TTable_monolithic tc = (TTable_monolithic)tt.clone(); tc.clear();
    ATable ac = (ATable)at.clone(); ac.clear();
View Full Code Here

Examples of edu.umd.hooka.PhrasePair

    int[] fw = {1, 2};
    //int[] fw = {2, 1, 2};
    int[] ew = {2, 1};
    Phrase f = new Phrase(fw, 1);
    Phrase e = new Phrase(ew, 1);
    PhrasePair pp = new PhrasePair(f, e);
    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

Examples of edu.umd.hooka.PhrasePair

    int[] fw = {2, 1, 2, 3, 2, 2, 2};
    //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);
View Full Code Here

Examples of edu.umd.hooka.PhrasePair

    int[] fw = {1, 3, 2, 1};
    //int[] fw = {2, 1, 2};
    int[] ew = {2, 1, 2};
    Phrase f = new Phrase(fw, 1);
    Phrase e = new Phrase(ew, 1);
    PhrasePair pp = new PhrasePair(f, e);
    hmm = new HMM_NullWord(tt, at, -1.0);
    hmm.buildHMMTables(pp);
    hmm.baumWelch(pp, null);
    TTable_monolithic tc = (TTable_monolithic)tt.clone(); tc.clear();
    ATable ac = (ATable)at.clone(); ac.clear();
View Full Code Here

Examples of edu.umd.hooka.PhrasePair

    tt.set(0, 2, 0.5f);
    Model1 m1 = new Model1(tt, false);
    int[] fw = {2, 1, 2, 2};
    //int[] fw = {2, 1, 2};
    int[] ew = {2, 1};
    PhrasePair pp = new PhrasePair(new Phrase(fw, 2), new Phrase(ew, 1));
    System.out.println(m1.computeAlignmentPosteriors(pp));
//    assertTrue(false);
  }
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.