/** * Displays the output of all annotators in a format easily readable by people. * * @param annotation Contains the output of all annotators * @param os The output stream */ public void prettyPrint(Annotation annotation, OutputStream os) { TextOutputter.prettyPrint(annotation, os, this); }
/** * Displays the output of all annotators in a format easily readable by people. * * @param annotation Contains the output of all annotators * @param os The output stream */ public void prettyPrint(Annotation annotation, PrintWriter os) { TextOutputter.prettyPrint(annotation, os, this); }
/** Static helper */ public static void prettyPrint(Annotation annotation, OutputStream stream, StanfordCoreNLP pipeline) { prettyPrint(annotation, new PrintWriter(stream), pipeline); }
/** * Displays the output of all annotators in a format easily readable by people. * @param annotation Contains the output of all annotators * @param os The output stream */ public void prettyPrint(Annotation annotation, OutputStream os) { TextOutputter.prettyPrint(annotation, os, this); }
/** * Displays the output of all annotators in a format easily readable by people. * @param annotation Contains the output of all annotators * @param os The output stream */ public void prettyPrint(Annotation annotation, PrintWriter os) { TextOutputter.prettyPrint(annotation, os, this); }
/** * Displays the output of all annotators in a format easily readable by people. * * @param annotation Contains the output of all annotators * @param os The output stream */ public void prettyPrint(Annotation annotation, OutputStream os) { TextOutputter.prettyPrint(annotation, os, this); }
/** * Displays the output of all annotators in a format easily readable by people. * * @param annotation Contains the output of all annotators * @param os The output stream */ public void prettyPrint(Annotation annotation, PrintWriter os) { TextOutputter.prettyPrint(annotation, os, this); }
/** Static helper */ public static void prettyPrint(Annotation annotation, OutputStream stream, StanfordCoreNLP pipeline) { prettyPrint(annotation, new PrintWriter(stream), pipeline); }
public static void prettyPrint(Annotation annotation, OutputStream stream, StanfordCoreNLP pipeline) { try { PrintWriter os = new PrintWriter(IOUtils.encodedOutputStreamWriter(stream, pipeline.getEncoding())); prettyPrint(annotation, os, pipeline); // already flushed // don't close, might not want to close underlying stream } catch (IOException e) { throw new RuntimeIOException(e); } }
break; case READABLE: TextOutputter.prettyPrint(annotation, outputStream, pipeline); break; case XML: