stanford-core-nlp icon indicating copy to clipboard operation
stanford-core-nlp copied to clipboard

Using SemanticGraph.OutputFormat enum as argument

Open nark opened this issue 7 years ago • 0 comments

Hey

First, thank you for the good work here, these bindings to the StanfordCoreNLP API are very useful !

I'm trying to print Stanford dependencies as XML using the toString() method. But I can't figure how to pass the enum argument properly. Do I have to manually load some classes before doing so? I tried the following options, without luck. Any hint ?

graph = sentence.get(:basic_dependencies).toString(XML)
graph = sentence.get(:basic_dependencies).toString(OutputFormat::XML)
graph = sentence.get(:basic_dependencies).toString(StanfordCoreNLP::SemanticGraph.OutputFormat.XML)

nark avatar Jan 16 '18 14:01 nark