Hi,
We faced an issue when we use annotate function on java development environment.
The symtom is as following.
- we used 0.8.0 version of JAR file you shared on this repository.
- we set properties as below before we call annotate function.
import jigg.pipeline.Pipelie;
import java.util.properties;
...
Properties prop = new Properties();
prop.setProperty("annotators", "ssplit,mecab,cabocha");
prop.setProperty("outpurFormat", "json");
- and we call annotate as follwoing.
...
pipeline = new Pipeline(prop)
annotation = pipeline.annotate(msg)
- The output format of returned value
annotation is always XML not JSON. However we set the property as JSON.
- For in case, we checked the property value of
outputFormat we set as following.
But, it returned JSON always as we set.
...
System.out.println(pipeline.outputFormat();
...
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.
Hi,
We faced an issue when we use annotate function on java development environment.
The symtom is as following.
annotationis alwaysXMLnotJSON. However we set the property asJSON.outputFormatwe set as following.But, it returned
JSONalways as we set.Based on the result, it seems that there are some inconsistency between set value of
outputFormaton 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.