/** * Annotate quotes and extract them like sentences */ public Annotator quote(Properties properties) { Properties relevantProperties = PropertiesUtils.extractPrefixedProperties(properties, Annotator.STANFORD_QUOTE + '.'); return new QuoteAnnotator(relevantProperties); }
public static Annotation getAnnotatedFile(String text, String baseFileName, Properties props) throws IOException{ File processedFile = new File(baseFileName + ".ser.gz"); processCoreNLPIfDoesNotExist(processedFile, props, text); Annotation doc = ExtractQuotesUtil.readSerializedProtobufFile(processedFile); new QuoteAnnotator(new Properties()).annotate(doc); //important! Re-annotate to take into account that certain tokens are removed in the serialization process. return doc; }
/** * Annotate quotes and extract them like sentences */ public Annotator quote(Properties properties) { Properties relevantProperties = PropertiesUtils.extractPrefixedProperties(properties, Annotator.STANFORD_QUOTE + '.'); return new QuoteAnnotator(relevantProperties); }
public static Annotation getAnnotatedFile(String text, String baseFileName, Properties props) throws IOException{ File processedFile = new File(baseFileName + ".ser.gz"); processCoreNLPIfDoesNotExist(processedFile, props, text); Annotation doc = ExtractQuotesUtil.readSerializedProtobufFile(processedFile); new QuoteAnnotator(new Properties()).annotate(doc); //important! Re-annotate to take into account that certain tokens are removed in the serialization process. return doc; }