Skip to content

Commit

Permalink
Merge pull request #149 from kkasunperera/newtests
Browse files Browse the repository at this point in the history
adding equative type sentences
  • Loading branch information
linas committed Jul 29, 2014
2 parents d832743 + 2d11b08 commit 0197fcd
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/java_test/relex/test/TestRelEx.java
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,53 @@ public boolean test_comparatives()
report(rc, "Comparatives");
return rc;
}

public boolean test_equatives()
{
boolean rc = true;
//Equative:two entities one feature
rc &= test_sentence ("Amen's hair is as long as Ben's.",
"_poss(hair, Amen)\n"+
"_predadj(hair, long)\n"+
"_as(long, hair)\n"+
"_than(Amen, Ben)\n");

rc &= test_sentence ("Amen’s hair is same as Ben’s.",
"_poss(hair, Amen)\n"+
"_predadj(hair, same)\n"+
"_as(same, hair)\n"+
"_than(Amen, Ben)\n");

rc &= test_sentence ("Jack’s hair color is similar to that of Ben’s.",
"_poss(color, Jack)\n"+
"_nn(color, hair)\n"+
"_predadj(color, similar)\n"+
"of(that, Ben)\n"+
"to(similar, that)\n"+
"_as(similar, color)\n"+
"_than(Jack, Ben)\n");

rc &= test_sentence ("Jack is as intelligent as Ben.",
"_predadj(Jack, intelligent)\n"+
"_as(intelligent, Jack)\n"+
"_than(Jack, Ben)\n");

rc &= test_sentence ("The book’s color is same as that of the pen’s.",
"_poss(color, book)\n"+
"_predadj(color, same)\n"+
"of(that, pen)\n"+
"_as(same, color)\n"+
"_than(book, pen)\n");

rc &= test_sentence ("The snail is running exactly as fast as the cheetah.",
"_predadj(snail, run)\n"+
"_as(fast, run)\n"+
"_advmod(fast, exactly)\n"+
"_than(snail, cheetah)\n");

report(rc, "Equatives");
return rc;
}

public boolean test_conjunctions()
{
Expand Down Expand Up @@ -1145,6 +1192,7 @@ public void runTests() {

rc &= ts.test_determiners();
rc &= ts.test_comparatives();
rc &= ts.test_equatives();
rc &= ts.test_extraposition();
rc &= ts.test_conjunctions();

Expand Down

0 comments on commit 0197fcd

Please sign in to comment.