From 91df8d9a8e30d58149de4b3536efc02949db09c5 Mon Sep 17 00:00:00 2001 From: Eric Kafe Date: Wed, 31 Jan 2024 09:03:19 +0100 Subject: [PATCH] Add param description --- nltk/corpus/reader/wordnet.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nltk/corpus/reader/wordnet.py b/nltk/corpus/reader/wordnet.py index e339b5ddf6..4834d7f627 100644 --- a/nltk/corpus/reader/wordnet.py +++ b/nltk/corpus/reader/wordnet.py @@ -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)