有没有办法使用 OpenNLP 获取句子的主题? [英] Is there a way to get the subject of a sentence using OpenNLP?

查看:24
本文介绍了有没有办法使用 OpenNLP 获取句子的主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用 OpenNLP 获取句子的主语?我试图确定用户句子中最重要的部分.通常,用户会向我们的引擎"提交句子,我们想确切地知道该句子的核心主题是什么.

Is there a way to get the subject of a sentence using OpenNLP? I'm trying to identify the most important part of a users sentence. Generally, users will be submitting sentences to our "engine" and we want to know exactly what the core topic is of that sentence.

目前我们使用 openNlp 来:

Currently we are using openNlp to:

  1. 把句子分块
  2. 识别句子的名词短语、动词等
  3. 确定句子的所有主题"
  4. (尚未完成!)确定句子的核心主题"

如果您有任何好的想法,请告诉我..

Please let me know if you have any bright ideas..

推荐答案

依赖解析器

如果您对提取语法关系感兴趣,例如哪个词或短语是句子的主语,您应该真正使用 依赖解析器.虽然 OpenNLP 确实支持短语结构解析,但我认为它还没有进行依赖解析.

If you're interested in extracting grammatical relations such as what word or phrase is the subject of a sentence, you should really use a dependency parser. While OpenNLP does support phrase structure parsing, I don't think it does dependency parsing yet.

开源软件

用 Java 编写的支持依赖解析的包包括:

Packages written in Java that support dependency parsing include:

其中,Stanford Parser 是最准确的.但是,MaltParser 的某些配置可能非常快(Cer et al. 2010).

Of these, the Stanford Parser is the most accurate. However, some configurations of the MaltParser can be insanely fast (Cer et al. 2010).

这篇关于有没有办法使用 OpenNLP 获取句子的主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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