Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Wordnet の polysemy count を使用して、単語が持つさまざまな意味の数を取得する方法を知っています (NLTK 経由)。しかし、スクリプトの残りの部分で感覚を使用したいので、数字だけでなく、これらのさまざまな感覚を返すことも可能かどうか疑問に思っていました。誰にも手がかりがありますか?ありがとう!
これはうまくいくはずです:
def polysemy(word): return wn.synsets(word)
len()関数を感覚のリストに適用していたため、感覚の数を取得していました。
len()