CoreNLP SemanticGraph-搜索具有特定引理的边 [英] CoreNLP SemanticGraph - search for edges with specific lemmas

查看:122
本文介绍了CoreNLP SemanticGraph-搜索具有特定引理的边的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Stanford CoreNLP的依赖关系解析器,想知道如何对具有特定头引理,从属引理和词法关系的SemanticEdge(s)进行通用搜索.例如,如果我有一个像这样的实际依赖项:

I'm using Stanford CoreNLP's dependency parser, and wondering how to make a generic search for SemanticEdge(s) with specific head lemma, dependent lemma, and lexical relationship. For example, if I have an actual dependency like this:

  • dobj(discover-4,见解6)

如何使用引理而不是原义词和索引进行搜索?基本上,我希望能够使用通用规则对依赖图的各个部分进行模式匹配...

How do I search for it using lemmas instead of the literal word and the index? Basically I want to be able to pattern match the parts of the dependency graph using generic rules...

推荐答案

您可以使用semgrex进行此操作.请参阅 http://nlp.stanford.edu/software/tregex.shtml .虽然您也可以手动执行.确保节点正在存储引理-请参阅CoreNLP的lemma注释器(当前仅适用于英语).

You could do this with semgrex. See http://nlp.stanford.edu/software/tregex.shtml. Though you could also do it manually. Make sure that the nodes are storing lemmas -- see the lemma annotator of CoreNLP (currently available for English, only).

这篇关于CoreNLP SemanticGraph-搜索具有特定引理的边的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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