You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The relation closure for wordnet synsets is supposed to prevent duplicates in the output. However, the duplicates check fails to detect some repetitions, which occur when there are multiple paths to a given synset. In the following output for ex., the branch going from 'taxonomic_group.n.01' to 'entity.n.01' appears twice, because it is reachable by two different paths:
from nltk.corpus import wordnet as wn
ss=wn.synset("calamagrostis.n.01")
print(list(ss.closure(lambda s: s.hypernyms())))
The relation closure for wordnet synsets is supposed to prevent duplicates in the output. However, the duplicates check fails to detect some repetitions, which occur when there are multiple paths to a given synset. In the following output for ex., the branch going from 'taxonomic_group.n.01' to 'entity.n.01' appears twice, because it is reachable by two different paths:
Produce an SVG image to illustrate this graph:
The text was updated successfully, but these errors were encountered: