将单词转换为特定的词性(POS)格式?

时间:2013-08-31 23:04:40

标签: nlp nltk

有一个词,是否有可能使用NLTK将该单词转换为特定的词性(POS)形式?例如,给定单词“run”,我可以要求NLTK将其转换为以下任何一种:

VBZ: runs, as in "George runs to the store."
VBD: ran,  as in "George ran to the store."
VB:  run,  as in "George wants to run."

等。如果是,对于名词一样吗? e.g:

NN:  run,  as in "George wants to run."
NNS: runs, as in "George went for two runs."
NNP: Run,  as in "George had dinner at Run."

1 个答案:

答案 0 :(得分:4)

您应该尝试pattern

它具有以下功能:

  • 多元化+单一化
  • 比较+最高级
  • 动词共轭
  • 定量

希望这有帮助。