gate.util.web
Class WebAnnie
java.lang.Object
gate.util.web.WebAnnie
- public class WebAnnie
- extends Object
This class is designed to demonstrate ANNIE in a web context. It should be
called from either a servlet or a JSP.
Method Summary |
private void |
initAnnie()
Initialise the ANNIE system. |
String |
process(javax.servlet.ServletContext app,
String url,
String[] annotations)
This method should be called from a servlet or JSP. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GATE_INIT_KEY
public static final String GATE_INIT_KEY
- See Also:
- Constant Field Values
ANNIE_CONTROLLER_KEY
public static final String ANNIE_CONTROLLER_KEY
- See Also:
- Constant Field Values
annieController
private SerialAnalyserController annieController
- The Corpus Pipeline application to contain ANNIE
filePath
private String filePath
WebAnnie
public WebAnnie()
initAnnie
private void initAnnie()
throws GateException
- Initialise the ANNIE system. This creates a "corpus pipeline"
application that can be used to run sets of documents through
the extraction system.
- Throws:
GateException
process
public String process(javax.servlet.ServletContext app,
String url,
String[] annotations)
throws GateException,
IOException
- This method should be called from a servlet or JSP.
- Parameters:
app
- The current servlet context, eg the JSP implicit variable "application"url
- The url of the file to be analysedannotations
- An array of annotations
- Throws:
GateException
IOException