/** * Process a collection of files. * * @param base The base input directory to process from. * @param files The files to process. * @param numThreads The number of threads to annotate on. * @param clearPool Whether or not to clear pool when process is done * * @throws IOException */ public void processFiles(String base, final Collection<File> files, int numThreads, boolean clearPool, Optional<Timing> tim) throws IOException { AnnotationOutputter.Options options = AnnotationOutputter.getOptions(properties); StanfordCoreNLP.OutputFormat outputFormat = StanfordCoreNLP.OutputFormat.valueOf(properties.getProperty("outputFormat", DEFAULT_OUTPUT_FORMAT).toUpperCase()); processFiles(base, files, numThreads, properties, this::annotate, createOutputter(properties, options), outputFormat, clearPool, Optional.of(this), tim); }
public String print(Annotation ann, StanfordCoreNLP pipeline) throws IOException { return print(ann, getOptions(pipeline.getProperties())); }
public void print(Annotation annotation, OutputStream os, StanfordCoreNLP pipeline) throws IOException { print(annotation, os, getOptions(pipeline.getProperties())); }
AnnotationOutputter.Options options = AnnotationOutputter.getOptions(properties); String encoding = getEncoding(); BufferedReader r = new BufferedReader(IOUtils.encodedInputStreamReader(System.in, encoding));
AnnotationOutputter.Options options = AnnotationOutputter.getOptions(pipeline.getProperties()); StanfordCoreNLP.createOutputter(props, options).accept(completedAnnotation, os); os.close();
/** * Process a collection of files. * * @param base The base input directory to process from. * @param files The files to process. * @param numThreads The number of threads to annotate on. * @param clearPool Whether or not to clear pool when process is done * * @throws IOException */ public void processFiles(String base, final Collection<File> files, int numThreads, boolean clearPool, Optional<Timing> tim) throws IOException { AnnotationOutputter.Options options = AnnotationOutputter.getOptions(properties); StanfordCoreNLP.OutputFormat outputFormat = StanfordCoreNLP.OutputFormat.valueOf(properties.getProperty("outputFormat", DEFAULT_OUTPUT_FORMAT).toUpperCase()); processFiles(base, files, numThreads, properties, this::annotate, createOutputter(properties, options), outputFormat, clearPool, Optional.of(this), tim); }
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())); }
AnnotationOutputter.Options options = AnnotationOutputter.getOptions(properties); String encoding = getEncoding(); BufferedReader r = new BufferedReader(IOUtils.encodedInputStreamReader(System.in, encoding));
AnnotationOutputter.Options options = AnnotationOutputter.getOptions(pipeline.getProperties()); StanfordCoreNLP.createOutputter(props, options).accept(completedAnnotation, os); os.close();