Examples of endsWithTwoTerminals()


Examples of joshua.corpus.MatchedHierarchicalPhrases.endsWithTwoTerminals()

    Assert.assertEquals(M_a_alpha.arity(),2);
    Assert.assertEquals(M_a_alpha.getNumberOfTerminalSequences(),2);
    Assert.assertFalse(M_a_alpha.startsWithNonterminal());
    Assert.assertFalse(M_a_alpha.secondTokenIsTerminal());
    Assert.assertTrue(M_a_alpha.endsWithNonterminal());
    Assert.assertFalse(M_a_alpha.endsWithTwoTerminals());
    Assert.assertFalse(M_a_alpha.isEmpty());
    Assert.assertEquals(M_a_alpha.getFirstTerminalIndex(0), 25);
    Assert.assertEquals(M_a_alpha.getFirstTerminalIndex(1), 27);
    Assert.assertEquals(M_a_alpha.getLastTerminalIndex(0), 30+1);
    Assert.assertEquals(M_a_alpha.getLastTerminalIndex(1), 30+1);
View Full Code Here

Examples of joshua.corpus.MatchedHierarchicalPhrases.endsWithTwoTerminals()

    Assert.assertEquals(M_alpha_b.arity(),2);
    Assert.assertEquals(M_alpha_b.getNumberOfTerminalSequences(),2);
    Assert.assertTrue(M_alpha_b.startsWithNonterminal());
    Assert.assertTrue(M_alpha_b.secondTokenIsTerminal());
    Assert.assertFalse(M_alpha_b.endsWithNonterminal());
    Assert.assertFalse(M_alpha_b.endsWithTwoTerminals());
    Assert.assertFalse(M_alpha_b.isEmpty());
    Assert.assertEquals(M_alpha_b.getFirstTerminalIndex(0), 2);
    Assert.assertEquals(M_alpha_b.getFirstTerminalIndex(1), 30);
    Assert.assertEquals(M_alpha_b.getFirstTerminalIndex(2), 30);
    Assert.assertEquals(M_alpha_b.getFirstTerminalIndex(3), 700);
View Full Code Here

Examples of joshua.corpus.MatchedHierarchicalPhrases.endsWithTwoTerminals()

    Assert.assertEquals(M_a_alpha_b.getLastTerminalIndex(2), 36+1);
   
    Assert.assertFalse(M_a_alpha_b.startsWithNonterminal());
    Assert.assertFalse(M_a_alpha_b.secondTokenIsTerminal());
    Assert.assertFalse(M_a_alpha_b.endsWithNonterminal());
    Assert.assertFalse(M_a_alpha_b.endsWithTwoTerminals());
   
  }
}
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.