Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run GATE pipeline from inside a Java program without the GUI. build a tomcat app with gate

i have built some plugin components to GATE and in combination with ANNIE tools, im running a pipeline in GATE platform.

Does anyone know how can i run a pipeline from the console? I want to build a web application in Tomcat that will be taking a plain text from the web page, passing it to the GATE pipeline i have built and do something. So i need to run GATE in a simple Java file, how can it be done?

Thanks in advance and sorry for my poor grammar

like image 607
maiky Avatar asked Jan 31 '10 11:01

maiky


1 Answers

First download GATE, it's like 320mb or something. Then if you use netbeans, you can add GATE to your by going to project -> Library -> right click add jar files and browse to GATE installation file and choose all JAR files inside lib folder. Once all jar file are there you can use GATE. (See GATE chapter.7 GATE Embedded).

A simple example is to use ANNIE, there is standAloneAnnie where you only need to pass a file and it will process it for you.

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

Once you add ANNIE to your project, you can use it by calling it's main method/you can change it's name later, and pass a File array as a parameter. The file array should contain the file you want to process.

like image 117
Mohammed Joraid Avatar answered Oct 01 '22 10:10

Mohammed Joraid