关于这一点 联系我试着用 "玩 "这个字来试探一下。
from nltk.corpus import wordnet as wn
forms = set() #We'll store the derivational forms in a set to eliminate duplicates
for happy_lemma in wn.lemmas("play"): #for each "happy" lemma in WordNet
forms.add(happy_lemma.name()) #add the lemma itself
for related_lemma in happy_lemma.derivationally_related_forms(): #for each related lemma
forms.add(related_lemma.name()) #add the related lemma
print(forms)
我得到了以下输出:-
{'play', 'playing', 'playlet', 'player'}
有没有办法将 "play"、"psays "这样的词加入到上述结果中?
词网 没有 戏 "字,因为它是。拐弯抹角 名词或动词 "play "的形式,而不是派生词。您在输出中看到 "playing "是因为它是由 "play "派生出来的形容词(例如 "playing field"),而不是因为它是 "play "的现在分词形式。
在这里,你可以看到:"play "是由 "play "派生出来的形容词,而不是因为它是 "play "的现在分词形式。 是关于转折与派生的更多信息。
衍生词对词干的意义进行了根本性的改变,而拐弯词则用来标记语法信息。