/** Static helper */ public static void prettyPrint(Annotation annotation, PrintWriter pw, StanfordCoreNLP pipeline) { TextOutputter.print(annotation, pw, getOptions(pipeline.getProperties())); // already flushed // don't close, might not want to close underlying stream }
/** * Converts the given annotation to an XML document using options taken from the StanfordCoreNLP pipeline */ public static Document annotationToDoc(Annotation annotation, StanfordCoreNLP pipeline) { Options options = getOptions(pipeline.getProperties()); return annotationToDoc(annotation, options); }
public void print(Annotation annotation, OutputStream os, StanfordCoreNLP pipeline) throws IOException { print(annotation, os, getOptions(pipeline.getProperties())); }
public String print(Annotation ann, StanfordCoreNLP pipeline) throws IOException { return print(ann, getOptions(pipeline.getProperties())); }
/** Static helper */ public static void prettyPrint(Annotation annotation, PrintWriter pw, StanfordCoreNLP pipeline) { try { TaggedTextOutputter.print(annotation, pw, getOptions(pipeline.getProperties())); // already flushed // don't close, might not want to close underlying stream } catch (IOException e) { throw new RuntimeIOException(e); } }
StanfordCoreNLP.OutputFormat of; try { props = getProperties(httpExchange); AnnotationOutputter.Options options = AnnotationOutputter.getOptions(pipeline.getProperties()); StanfordCoreNLP.createOutputter(props, options).accept(completedAnnotation, os); os.close();
/** * Converts the given annotation to an XML document using options taken from the StanfordCoreNLP pipeline */ public static Document annotationToDoc(Annotation annotation, StanfordCoreNLP pipeline) { Options options = getOptions(pipeline.getProperties()); return annotationToDoc(annotation, options); }
/** Static helper */ public static void prettyPrint(Annotation annotation, PrintWriter pw, StanfordCoreNLP pipeline) { TextOutputter.print(annotation, pw, getOptions(pipeline.getProperties())); // already flushed // don't close, might not want to close underlying stream }
public void print(Annotation annotation, OutputStream os, StanfordCoreNLP pipeline) throws IOException { print(annotation, os, getOptions(pipeline.getProperties())); }
public String print(Annotation ann, StanfordCoreNLP pipeline) throws IOException { return print(ann, getOptions(pipeline.getProperties())); }
props = pipeline.getProperties(); long setupTime = tim.report();
StanfordCoreNLP.OutputFormat of; try { props = getProperties(httpExchange); AnnotationOutputter.Options options = AnnotationOutputter.getOptions(pipeline.getProperties()); StanfordCoreNLP.createOutputter(props, options).accept(completedAnnotation, os); os.close();
props = pipeline.getProperties(); long setupTime = tim.report();