4
我正在使用斯坦福标记确定词类。但是,我想从文本中获得更多信息。是否有可能获得进一步的信息,如句子的时态或主动/被动?从标记器获取附加信息(主动/被动,时态...)
到目前为止,我使用的是非常基本的POS-标记方法:
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));
}
非常感谢您的帮助!然而,当我使用德语进行“主动/被动检测”时,我被卡住了 - > http://stackoverflow.com/questions/19531208/how-to-use-stanford-corenlp-with-a-non-english-parse-model –
一直在阅读关于此的文档,并且此nsubjpass关系似乎是所有被动语句的特征 - http://nlp.stanford.edu/nlp/javadoc/javanlp/edu/stanford/nlp/trees/EnglishGrammaticalRelations.html# NOMINAL_PASSIVE_SUBJECT – JasTonAChair