如何使用NLP确定句子中的主词? [英] How can i determine the head word in a Sentence, using NLP?

查看:109
本文介绍了如何使用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.

推荐答案

您正在寻找主词句子分析.

您可以在此链接.

这与依赖性解析也有很大关系,正如您在链接中的Stanford NLP软件包中所见.并在 Wiki

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

这篇关于如何使用NLP确定句子中的主词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆