Class ProcessTsurgeonRequest
- java.lang.Object
-
- edu.stanford.nlp.util.ProcessProtobufRequest
-
- edu.stanford.nlp.trees.tregex.tsurgeon.ProcessTsurgeonRequest
-
public class ProcessTsurgeonRequest extends ProcessProtobufRequest
-
-
Constructor Summary
Constructors Constructor Description ProcessTsurgeonRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)Command line tool for processing a semgrex request.voidprocessInputStream(InputStream in, OutputStream out)Reads a single request from the InputStream, then writes back a single response.static CoreNLPProtos.TsurgeonResponseprocessRequest(CoreNLPProtos.TsurgeonRequest request)For a single request, iterate through the Trees it includes, perform each Tsurgeon operation on each tree, and return a result with one tree per input tree.-
Methods inherited from class edu.stanford.nlp.util.ProcessProtobufRequest
leftoverArgs, process, processMultipleInputs
-
-
-
-
Method Detail
-
processRequest
public static CoreNLPProtos.TsurgeonResponse processRequest(CoreNLPProtos.TsurgeonRequest request)
For a single request, iterate through the Trees it includes, perform each Tsurgeon operation on each tree, and return a result with one tree per input tree.
-
processInputStream
public void processInputStream(InputStream in, OutputStream out) throws IOException
Reads a single request from the InputStream, then writes back a single response.- Specified by:
processInputStreamin classProcessProtobufRequest- Throws:
IOException
-
main
public static void main(String[] args) throws IOException
Command line tool for processing a semgrex request.
If -multiple is specified, will process multiple requests.- Throws:
IOException
-
-