从Tagger获取其他信息(主动/被动,时态...) [英] Getting additional information (Active/Passive, Tenses ...) from a Tagger
本文介绍了从Tagger获取其他信息(主动/被动,时态...)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用斯坦福工具(Stanford Tagger)确定词性.但是,我想从文本中获取更多信息.是否有可能获得更多信息,例如句子的时态,或者它是处于主动/被动状态?
I'm using the Stanford Tagger for determining the Parts of Speech. However, I want to get more information out of the text. Is there a possibility to get further information like the tense of the sentence or if it is in active/passive?
到目前为止,我使用的是非常基本的PoS标记方法:
So far, I'm using the very basic PoS-Tagging approach:
List<List<TaggedWord>> taggedUnits = new ArrayList<List<TaggedWord>>();
String input = "This sentence is going to be future. The door was opened.";
for (List<HasWord> sentence : MaxentTagger.tokenizeText(new StringReader(input)))
{
taggedUnits.add(tagger.tagSentence(sentence));
}
推荐答案
您可以从各种penn标记中获取紧张的信息:
You can get tense information from the various penn tags:
27. VB Verb, base form
28. VBD Verb, past tense
29. VBG Verb, gerund or present participle
30. VBN Verb, past participle
31. VBP Verb, non-3rd person singular present
32. VBZ Verb, 3rd person singular present
关于主动/被动方面,您可以使用Stanford Core NLP中包含的类型化依赖项.
About the active/passive aspect, you can use typed dependencies included in Stanford Core NLP.
- 如果句子是主动语态,则应该存在'nsubj'依赖.
- 如果句子是被动语态,则应使用'nsubjpass'依赖项 存在
- If the sentence is in active voice, a 'nsubj' dependecy should exist.
- If the sentence is in passive voice a 'nsubjpass' dependency should exist
希望这会有所帮助.
这篇关于从Tagger获取其他信息(主动/被动,时态...)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文