Run the GATE pipeline from within a Java program without a GUI. create a tomcat shutter application

I built some plugin components for GATE and in combination with ANNIE tools, im runs the pipeline in the GATE platform.

Does anyone know how I can start the pipeline from the console? I want to create a web application in Tomcat that will receive plain text from a web page, passing it to the GATE pipeline that I created and did something. So I need to run GATE in a simple Java file, how can this be done?

Thanks in advance and sorry for my bad grammar.

+4
source share
3 answers

The GATE sample code shows you how to start GATE in several ways, in particular, the Goldfish example shows how to start GATE from the command line.

+3
source

Download GATE first, it's like 320mb or something like that. Then, if you use netbeans, you can add GATE to yourself by going to the project -> Library -> right-click add jar files and go to the GATE installation file and select all the JAR files inside the lib folder. Once the entire jar file is there, you can use GATE. (See Chapter GATE.7 GATE Embedded).

A simple example is using ANNIE, there is standAloneAnnie where you only need to transfer the file and it will process it for you.

http://gate.ac.uk/wiki/code-repository/src/sheffield/examples/StandAloneAnnie.java

After you add ANNIE to your project, you can use it by calling it with the main method / you can later change its name and pass an array of files as a parameter. The file array must contain the file you want to process.

+4
source

You need to use GATE EMBEDDED.

Have a look here: http://gate.ac.uk/family/embedded.html
here: http://gate.ac.uk/sale/tao/splitch7.html#x11-1540007
take care of multithreaded problems (see the multithreaded part): gate.ac.uk/sale/tao/splitch7.html#x11-1730007.13

0
source

Source: https://habr.com/ru/post/1299872/


All Articles