stanford-core-nlp
stanford-core-nlp copied to clipboard
Using SemanticGraph.OutputFormat enum as argument
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)