Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding equative type sentences #149

Merged
merged 3 commits into from
Jul 29, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"+
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ruiting @linas is "_as(long, hair)" should be "_as(long, Ben)"?
coz dependencies comes as below right?
prep(long, as)
pobj(as, Ben)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why it should be _as(long, Ben)? So first, the head of comparison entity is "hair" instead of "Ben". Second, if we want to keep all the comparatives representations consistent, we should use:

_compare(long, hair) 
_poss(hair, Amen)
as(Amen, Ben)

"_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"+
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this of(that, Ben) and to(similar, that) correct and needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the sentence "Jack’s hair color is similar to Ben's" ?

"_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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to keep consistence with the normal comparative representations, it should be like:

_comparative(intelligent, Jack)
_than(Jack, Ben)
degree(intelligent, equal)

but I guess this is too deep for RelEx... So I think we can use:

_comparative(intelligent, Jack)
as(Jack, Ben)


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"+
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also this one?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its does seem a bit awkward, but I don't see a lot of choices ... maybe @ruiting has something to say.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First, I think the sentence should be "The book's is the same as that of the pen's.", right?
What about the representation like:

_comparative(same, color)
as(book, pen)
_poss(color, book)
of(that, pen)

"_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