【问题标题】:getting verbal noun from noun从名词中得到动词名词
【发布时间】:2019-11-01 14:05:11
【问题描述】:

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

我正在寻找一种算法,当给定名词时返回相应的动词(如果输入名词是动词名词)。
我最初的想法是对名词应用词干分析器,然后在动词列表中搜索具有相同词干的动词。
在此之前,我创建了一个小型测试数据集。
它表明有时这种方法行不通:
例如:
“解释”和“解释”的词干不同。
'to decision' 和 '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

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

【问题讨论】:

  • lemma.derivationally_related_forms() 对你有用吗?
  • 不错的方法和有用的链接。谢谢

标签: nlp nltk text-processing linguistics


【解决方案1】:

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

看看这个:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-06-03
    • 2018-10-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多