Skip to content

Commit

Permalink
Add param description
Browse files Browse the repository at this point in the history
  • Loading branch information
ekaf committed Jan 31, 2024
1 parent 4c6489a commit 91df8d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nltk/corpus/reader/wordnet.py
Expand Up @@ -327,12 +327,16 @@ def _related(self, relation_symbol):
"""Returns the lemma's relation targets for the given relation_symbol.
Includes both the lemma ("lexical") relations and the synset ("semantic") relations.
The in_topic_domain() relation (-c) is hybrid, becuse a few lemmas have
The in_topic_domain() relation (-c) is hybrid, because a few lemmas have
both lemma and synset targets. For ex:
>>> from nltk.corpus import wordnet as wn
>>> print(wn.lemmas("insect")[0].in_topic_domains())
[Lemma('chirpy.a.01.chirpy'), Synset('holometabolism.n.01')]
:param relation_symbol: pointer symbol denoting a WordNet relation
:type relation_symbol: string
:return: list of target lemmas and/or synsets
"""
get_synset = self._wordnet_corpus_reader.synset_from_pos_and_offset
ssrels = self._synset._related(relation_symbol)
Expand Down

0 comments on commit 91df8d9

Please sign in to comment.