【发布时间】:2013-02-03 07:29:49
【问题描述】:
有没有办法将斯坦福解析器生成的解析树转换为 DOT 格式。我知道将斯坦福依赖输出转换为 DOT 的方法 toDotFormat()。但我想将 edu.stanford.nlp.trees.Tree 转换为 DOT。 谢谢
【问题讨论】:
标签: nlp stanford-nlp
有没有办法将斯坦福解析器生成的解析树转换为 DOT 格式。我知道将斯坦福依赖输出转换为 DOT 的方法 toDotFormat()。但我想将 edu.stanford.nlp.trees.Tree 转换为 DOT。 谢谢
【问题讨论】:
标签: nlp stanford-nlp
这是一种用于生成所需结果的简单方法。
该函数使用广度优先搜索来遍历树。
https://github.com/skrtbhtngr/corenlp-helper/blob/master/TreeExtended.java
【讨论】:
目前没有执行此操作的代码。但是你可以自己穿过一棵树的孩子来编写这样的方法。
【讨论】: