@@ -0,0 +1,1845 @@
+package org.archdesc;%0A%0Aimport java.util.*;%0Aimport java.io.*;%0Aimport java.net.*;%0A%0Aimport gate.*;%0Aimport gate.creole.*;%0Aimport gate.util.*;%0Aimport gate.util.persistence.PersistenceManager;%0Aimport gate.corpora.RepositioningInfo;%0A%0A/**%0A * This class illustrates how to use ANNIE as a sausage machine%0A * in another application - put ingredients in one end (URLs pointing%0A * to documents) and get sausages (e.g. Named Entities) out the%0A * other end.%0A * %3CP%3E%3CB%3ENOTE:%3C/B%3E%3CBR%3E%0A * For simplicity's sake, we don't do any exception handling.%0A */%0Apublic class AnnieApp  %7B%0A%0A  /** The Corpus Pipeline application to contain ANNIE */%0A  private CorpusController annieController;%0A%0A  /**%0A   * Initialise the ANNIE system. This creates a %22corpus pipeline%22%0A   * application that can be used to run sets of documents through%0A   * the extraction system.%0A   */%0A  public void initAnnie() throws GateException, IOException %7B%0A    Out.prln(%22Initialising processing engine...%22);%0A%0A    // load the ANNIE application from the saved state in plugins/ANNIE%0A    File gateHome = Gate.getGateHome();%0A    //File anniePlugin = new File(pluginsHome, %22ANNIE%22);%0A    //TODO: Change to relative path%0A    //File annieGapp = new File(anniePlugin, %22~/ANNIEResumeParser.gapp%22);%0A    File annieGapp = new File(gateHome, %22ANNIEResumeParser.gapp%22);%0A    annieController = (CorpusController) PersistenceManager.loadObjectFromFile(annieGapp);%0A%0A    Out.prln(%22...processing engine loaded%22);%0A  %7D // initAnnie()%0A%0A  /** Tell ANNIE's controller about the corpus you want to run on */%0A  public void setCorpus(Corpus corpus) %7B%0A    annieController.setCorpus(corpus);%0A  %7D // setCorpus%0A%0A  /** Run ANNIE */%0A  public void execute() throws GateException %7B%0A    Out.prln(%22Running processing engine...%22);%0A    annieController.execute();%0A    Out.prln(%22...processing engine complete%22);%0A  %7D // execute()%0A%7D // class Annie%0A %0A

Create AnnieApp.java