如何使用NLP确定句子中的主词?
问题描述:
例如,如果给我一个句子:
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".
给定Python中的nltk包,如何找到它?我不是在说词干,而是指头词.
How can I find it, given the nltk package in Python? I am not talking about stemming, I refer to the head word.