CoreNLP SemanticGraph - search for edges with specific lemmas

a 夏天 提交于 2019-12-24 02:45:13

问题


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, insights-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...


回答1:


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).



来源:https://stackoverflow.com/questions/25326451/corenlp-semanticgraph-search-for-edges-with-specific-lemmas

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!