how to get a dependency tree with Stanford NLP parser

前端 未结 4 727
借酒劲吻你
借酒劲吻你 2020-12-16 16:22

How can I get the dependency tree as Figure below. I can get the dependency relation as pure text, and also the dependency graph with the help of dependencysee tool. But how

4条回答
  •  清歌不尽
    2020-12-16 16:54

    These graphs are produced using GraphViz, an open source graph drawing package, originally from AT&T Research. You can find a method toDotFormat() in edu.stanford.nlp.trees.semgraph.SemanticGraph that will convert a SemanticGraph into dot input language format which can be rendered by dot/GraphViz. At present, there isn't a command-line tool that provides this functionality, but it's pretty straightforward using that method.

提交回复
热议问题