问题描述
有没有办法使用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:
- 判断句子
- 识别句子的名词短语,动词等
- 识别句子的所有主题
- (未完成!)确定句子的核心主题
- Chunk the sentence
- Identify the noun-phrase, verbs, etc of the sentence
- Identify all "topics" of the sentence
- (NOT YET DONE!) Identify the "core topic" of the sentence
如果您有任何好主意,请告诉我。
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:
- (,请参阅类型依赖项部分)
- MaltParser
- MSTParser
- Stanford Parser (demo, see typed dependencies section)
- RelEx
其中,斯坦福分析师是最准确的。但是,MaltParser的某些配置可能非常快()。
Of these, the Stanford Parser is the most accurate. However, some configurations of the MaltParser can be insanely fast (Cer et al. 2010).
这篇关于有没有办法使用OpenNLP获得句子的主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!