Skip to content

Files

Latest commit

 

History

History

pipeline-client

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

CogComp Pipeline Client

A client is a light-weight system to access the pipeline through network. For more on the pipeline server, look here.

Java Client

After setting up the server on a remote machine, we can create a java client to make calls to the server. Here in the snnippet we show how it is done:

import edu.illinois.cs.cogcomp.pipeline.server.ServerClientAnnotator; 
import edu.illinois.cs.cogcomp.core.datastructures.ViewNames;
import edu.illinois.cs.cogcomp.core.datastructures.textannotation.TextAnnotation;

ServerClientAnnotator annotator = new ServerClientAnnotator();
annotator.setUrl("localhost", "8080"); // set the url and port name of your server here 
annotator.setViews(ViewNames.POS, ViewNames.LEMMA); // specify the views that you want 
TextAnnotation ta = annotator.annotate("This is the best sentence ever."); 
System.out.println(ta.getAvailableViews()); // here you should see that the required views are added.   

Python Client

CogComp-NLPy is our library for accessing our pipeline from Java.