How can i determine the head word in a Sentence, using NLP?

夙愿已清 提交于 2019-12-23 20:40:54

问题


For example, if I have been given a sentence:

A British soldier was killed in the fighting in Afghanistan

The head word of that sentence is "killed".

How can I find it, given the nltk package in Python? I am not talking about stemming, I refer to the head word.


回答1:


You are looking for the head word Sentence Parsing.

It's available in Python's nltk package, as you can see in this link.

It's also much related to Dependency Parsing, as you can see from Stanford NLP package in this link and explained quite a bit in this Wiki



来源:https://stackoverflow.com/questions/20500176/how-can-i-determine-the-head-word-in-a-sentence-using-nlp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!