Skip to content

Conversation

@stephantul
Copy link

#8 mentioned that some words return +8000 words when querying for synonyms. This is because some lemmata return None as a value when queried for their synset. These words are then mapped to None in the lemma2synset dictionary, which causes the inverse dictionary synset2lemma to return a whole bunch of garbage lemmata when querying None.

This PR fixes that issue by checking whether the synset_id of a lemma is None before creating a mapping. The mapping dictionaries are also changed from defaultdict to dict, as this can still cause None things to be added to the mapping dictionary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant