Wordnet'i thesarus olarak kullanmayı denedim, bu yüzden bir kelime listemiz var ve her kelimesi için eş anlamlılarını topladım. BuWordnet'teki sözcüklerin eşanlamlarını bulma
from nltk.corpus import wordnet as wn
for i,j in enumerate(wn.synsets('dog')):
print (j.lemma_names)
Bu kod aşağıdaki çıktıyı
<bound method Synset.lemma_names of Synset('dog.n.01')>
<bound method Synset.lemma_names of Synset('frump.n.01')>
<bound method Synset.lemma_names of Synset('dog.n.03')>
<bound method Synset.lemma_names of Synset('cad.n.01')>
<bound method Synset.lemma_names of Synset('frank.n.02')>
<bound method Synset.lemma_names of Synset('pawl.n.01')>
<bound method Synset.lemma_names of Synset('andiron.n.01')>
<bound method Synset.lemma_names of Synset('chase.v.01')>
verir Ama sadece eş bir listede toplamak istediğiniz çalıştı, bu nedenle çıktı bu
[ 'kocakarı' gibi olacak 'cad', 'frank', 'pawl', 'andiron', 'chase']
Baskı (j.lemma_names) 'yazdırmayı (j.lemma_names())' son satırını değiştirirseniz ne olur? – davedwards