0
我想從文本中提取相關術語,我想選擇最相關的術語。什麼NLTK技術爲標籤雲提取術語
How to config nltk data -> how, to, config ignored
config mysql to scan -> config NOT ingored
Python NLTK usage -> usage ingored
new song by the band usage -> usage NOT ingored
NLTK Thinks that -> thinks ignored
critical thinking -> thinking NOT ignored
我能想到的只有這個粗略的方法:
>>> text = nltk.word_tokenize(input)
>>> nltk.pos_tag(text)
,並只保存名詞和動詞。但即使「思考」和「思考」都是動詞,我只想保留「思考」。也「合併」「合併」。如果可以的話,我也想提取短語。另外像「free2play」,「@pro_blogger」等
方面請提出一個更好的方案或如何真正使我的方案的工作。