emory-courses / computational-linguistics

Computational Linguistics.
90 stars 100 forks source link

[QZ#2] Question about the test case "'boy.n.01' and 'girl.n.01'" #8

Closed kxiao02 closed 3 years ago

kxiao02 commented 3 years ago

Hello everyone!

I was playing with my paths method using different test cases, and I somehow found that the hypernym_paths() method call of "boy.n.01" returned two paths that both lead to the leaf "male_child.n.01" instead of "boy.n.01". "girl.n.01" works totally fine, but it didn't show 'female_child.n.01' anywhere in the hypernym paths.

Does it mean that I am using the hypernym_paths() method in a wrong way? Will this cause problems when my paths method is put through the test cases?

Please help.

jdchoi77 commented 3 years ago

@kxiao02 this is normal; NLTK uses the ID of the first item in the synset to represent the entire synset so this behavior is expected. Please see the updated description of Quiz 2.

kxiao02 commented 3 years ago

@kxiao02 this is normal; NLTK uses the ID of the first item in the synset to represent the entire synset so this behavior is expected. Please see the updated description of Quiz 2.

Thank you!