/** * Get the polarity (the Natural Logic notion of polarity) for a given token in the sentence. * @param props The properties to use for the natural logic annotator. * @param index The index to return the polarity of. * @return A list of Polarity objects, one for each token of the sentence. */ public Polarity natlogPolarity(Properties props, int index) { document.runNatlog(props); synchronized (impl) { return ProtobufAnnotationSerializer.fromProto(tokensBuilders.get(index).getPolarity()); } }
/** * Get the polarity (the Natural Logic notion of polarity) for a given token in the sentence. * @param props The properties to use for the natural logic annotator. * @param index The index to return the polarity of. * @return A list of Polarity objects, one for each token of the sentence. */ public Polarity natlogPolarity(Properties props, int index) { document.runNatlog(props); synchronized (impl) { return ProtobufAnnotationSerializer.fromProto(tokensBuilders.get(index).getPolarity()); } }
/** * The Natural Logic notion of polarity for each token in a sentence. * @param props The properties to use for the natural logic annotator. * @return A list of Polarity objects, one for each token of the sentence. */ public List<Polarity> natlogPolarities(Properties props) { document.runNatlog(props); synchronized (impl) { return lazyList(tokensBuilders, x -> ProtobufAnnotationSerializer.fromProto(x.getPolarity())); } }
/** * The Natural Logic notion of polarity for each token in a sentence. * @param props The properties to use for the natural logic annotator. * @return A list of Polarity objects, one for each token of the sentence. */ public List<Polarity> natlogPolarities(Properties props) { document.runNatlog(props); synchronized (impl) { return lazyList(tokensBuilders, x -> ProtobufAnnotationSerializer.fromProto(x.getPolarity())); } }