首页 > 解决方案 > r中的词干提取和wordnet包问题

问题描述

对于关键字提取,我需要删除同义词。但是如果我不使用词干,wordnet 无法生成“year's”“cats”等词的同义词。如果我使用词干,“administer”之类的词变成“adminste”,wordnet 无法识别这个词。有什么解决办法吗?

标签: rkeywordwordnet

解决方案


您可能想尝试Lemmatization而不是Stemming,这将为您提供更可能在 WordNet 中找到的单词形式。

取自nlp.stanford.edu

Stemming usually refers to a crude heuristic process that chops off 
the ends of words in the hope of achieving this goal correctly most
of the time, and often includes the removal of derivational affixes. 
Lemmatization usually refers to doing things properly with the use 
of a vocabulary and morphological analysis of words, normally aiming 
to remove inflectional endings only and to return the base or 
dictionary form of a word

这是因为 WordNet 使用规范词形式,即类似于字典的词形式,这正是 Lemmatization 过程试图执行的。

如果不提供 WordNet 可以使用的单词形式(例如不进行标记),您将无法获得它的全部好处。

我建议建立一个简单的管道:

  1. 标记化
  2. 词形化
  3. 关键字提取(WordNet)

推荐阅读