Closed mboratko closed 5 years ago
The tests failed because of the change in the return type (relation
returning a set instead of an array), however I would argue that this is the correct return type in principle, so the downstream functions should be changed to expect a set as output.
Thanks.
I really like the expanded_relation
and hyponym, support.
I am a little 🤷 to the change of everything to be Sets
.
Because sets are generally slower than short vectors for all set operations in practice.
Because checking a vector of ~5 elements can be done in less time than most hash operations.
And wordnet relations are generally very small sets.
@mboratko how is this going?
LGTM, Thanks! nice first contribution
Previously, the
hypernyms
function was only returning a single synset, however there are some synsets with multiple hypernyms, eg. "lactate".These changes make it so that
hypernyms
work the same as the other functions (antonyms
andhyponyms
), and abstracts theexpanded_hypernym
code to a general breadth-first-searchexpanded_relation
function, which allows forexpanded_hyponyms
as well.