You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the result, it seems that there are some inconsistency between set value of outputFormat on pipeline when we use your JAR file on JAVA development environment.
Could you kindly look on this? Please let us know if JAVA is not supported yet.
Finally, for your references, I add python code we have used. Under the python environment, The output format from annotate function didn't show any issues.
The example of python code for using annotate
from pyjigg import Pipeline
from subprocess import Popen
...
# Making a child process for the pipeline server
self.proc = Popen(["java", "-Xmx4g", "-cp", '/opt/pipeline/jigg-0.8.0/jigg-0.8.0.jar', 'jigg.pipeline.PipelineServer'])
...
# Initializing Pipeline
self.pipeline = Pipeline('http://127.0.0.1:8080')
# call the annotate function
self.annotation = self.pipeline.annotate(msg, properties={'annotators': 'ssplit,mecab,cabocha', 'outputFormat': 'json'})
Thank you.
The text was updated successfully, but these errors were encountered:
Thanks for using Jigg. The problem is that the outpurFormat option only makes sense for command-line usage. This option changes the format of the output file only and not change the format of an internal annotated object, which is always Scala XML Node object.
Currently, we do not support to convert an XML Node to a JSON object. Sorry for the inconvenience. Or if you want to get the output in Jigg's JSON output format, this can be done by calling jigg.util.JSONUtil.toJSONFromNode(node: Node): String to the output of annotate(). However, this method only supports converting to a string directly from an XML. We may support conversion to a JSON object if there is a request.
Hi,
We faced an issue when we use annotate function on java development environment.
The symtom is as following.
annotation
is alwaysXML
notJSON
. However we set the property asJSON.
outputFormat
we set as following.But, it returned
JSON
always as we set.Based on the result, it seems that there are some inconsistency between set value of
outputFormat
on pipeline when we use your JAR file on JAVA development environment.Could you kindly look on this? Please let us know if JAVA is not supported yet.
Finally, for your references, I add python code we have used. Under the python environment, The output format from annotate function didn't show any issues.
Thank you.
The text was updated successfully, but these errors were encountered: