@@ -0,0 +1,1610 @@
+package io.shike.nlp;%0A%0Aimport java.util.Collection;%0Aimport java.util.Properties;%0A%0Aimport edu.stanford.nlp.ie.util.RelationTriple;%0Aimport edu.stanford.nlp.ling.CoreAnnotations;%0Aimport edu.stanford.nlp.naturalli.NaturalLogicAnnotations;%0Aimport edu.stanford.nlp.pipeline.Annotation;%0Aimport edu.stanford.nlp.pipeline.StanfordCoreNLPClient;%0Aimport edu.stanford.nlp.util.CoreMap;%0A%0A/**%0A * @author Ranger Tsao(https://github.com/boliza)%0A */%0Apublic class CorenlpClient %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        Properties props = new Properties();%0A        props.setProperty(%22annotators%22, %22tokenize,ssplit,pos,lemma,depparse,natlog,openie%22);%0A        StanfordCoreNLPClient pipeline = new StanfordCoreNLPClient(props, %22http://192.168.199.209%22, 8080, 2);%0A%0A        // Annotate an example document.%0A        Annotation doc = new Annotation(%22Vert.x is created by Tim Fox%22);%0A        pipeline.annotate(doc);%0A%0A        // Loop over sentences in the document%0A        for (CoreMap sentence : doc.get(CoreAnnotations.SentencesAnnotation.class)) %7B%0A            // Get the OpenIE triples for the sentence%0A            Collection%3CRelationTriple%3E triples = sentence.get(NaturalLogicAnnotations.RelationTriplesAnnotation.class);%0A            // Print the triples%0A            for (RelationTriple triple : triples) %7B%0A                System.out.println(triple.confidence + %22%5Ct%22 +%0A                                       triple.subjectLemmaGloss() + %22%5Ct%22 +%0A                                       triple.relationLemmaGloss() + %22%5Ct%22 +%0A                                       triple.objectLemmaGloss());%0A            %7D%0A        %7D%0A    %7D%0A%0A%7D%0A

add Stanford CoreNLP Client