Skip to content

Commit

Permalink
adding Equative sentence binary relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
kkasunperera committed Jul 28, 2014
1 parent 4b06412 commit 2d11b08
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/java_test/relex/test/TestRelEx.java
Original file line number Diff line number Diff line change
Expand Up @@ -912,31 +912,43 @@ 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"+
"_nn(color, hair)\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"+
"_poss(color, book)\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"+
"_than(snail, cheetah)\n"+
"_advmod(is, exactly)\n");
"_advmod(fast, exactly)\n"+
"_than(snail, cheetah)\n");

report(rc, "Equatives");
return rc;
Expand Down

0 comments on commit 2d11b08

Please sign in to comment.