从名词得到动词名词

getting verbal noun from noun

动词名词是由动词形成或以其他方式对应于动词的名词。

我正在寻找一种算法,当给定名词时 returns 对应的动词(如果输入名词是动词名词)。
我最初的想法是对名词应用词干分析器,然后在动词列表中搜索具有相同词干的动词。
在这样做之前,我创建了一个小型测试数据集。
它表明有时这种方法不起作用:
例如:
'to explain' 和 'explanation' 没有相同的词干。
'to decide' 和 'decision' 没有相同的词干。

from nltk.stem.snowball import SnowballStemmer
stemmer = SnowballStemmer('english')

l=[('to increase', 'increase'),
('to inhibit', 'inhibition'),
('to activate', 'activation'),
  ('to explain', 'explanation'),
  ('to correlate', 'correlation'),
  ('to decide', 'decision'),
   ('to insert', 'insertion')
  ]

for p in l:
    print(stemmer.stem(p[0]), ' <-> ', stemmer.stem(p[1]))

#to increas  <->  increas
#to inhibit  <->  inhibit
#to activ  <->  activ
#to explain  <->  explan
#to correl  <->  correl
#to decid  <->  decis
#to insert  <->  insert

有谁知道在派生名词没有相同词干的情况下可以使用的方法吗?

没有适用于所有情况的解决方案,因为您无法确定所有情况。在英语中,实际上任何名词都可以是 "verbed",从而形成一种无限集合。 您可以做的是对标记进行词形还原,然后使用 nltk 的 lemma.derivationally_related_forms() 函数来获取从动词派生的所有名词。搜索相应的数据结构会给你正确的结果。为了减少您必须为每个名词搜索的动词数量,您可以使用类似最大公共前缀的东西,例如.

看看这个:

https://www.howtobuildsoftware.com/index.php/how-do/4EO/python-nlp-wordnet-get-noun-from-verb-wordnet