2013-08-31 33 views
1

給定一個詞,是否有可能使用NLTK將該詞轉換爲特定的詞性(POS)形式?例如,給定字「跑」,我可以問NLTK將其轉換爲以下任一:將單詞轉換爲特定的詞性(POS)格式?

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." 

等,如果是,同爲名詞?例如: -

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." 
+0

「跑步」絕對是一個動詞。對於NN,也許「喬治跑了。」 – tripleee

回答

4

你應該嘗試pattern

它具有的功能,如:

  • 多元化+一元化
  • 比較+最高級
  • 動詞變位
  • 定量

希望這會有所幫助。