IDE Configuration for gate.sa.modules - gsi-upm/SAGA GitHub Wiki

These instructions are to import the project gate.sa.modules, which is located under this repository, into Eclipse. It contains all the java code related to the developed processing resources and the modules that groups them, the linguistic resources such as gazetteers, tokenizers and jape rules, and few examples of use.

Remember to have GATE Developer installed in your system.

IDE configuration for gate.sa.modules project

(The following asume you are using Eclipse as IDE)

  1. Clone or unzip the downloaded code from this repository into your workspace.
  2. Import the project gate.sa.modules into your JDE:
    • File -> Import -> General -> File System
    • Select the root directory or the src folder of the project.
  3. Include GATE libraries:
    • Open Eclipse preferences:
      • Under application menu on Mac OS X.
      • Under Window menu on Ubuntu.
    • Java -> Build Path -> User Libraries -> New -> Name the new library as GATE -> OK
    • Select the new GATE library -> Add External JARs:
      • Go to the root directory of the GATE installation.
      • Add all de JARs from lib.
      • Add gate.jar from bin. * Expand the gate.jar entry. * Edit the “Source attachment” and point it at the src directory of your GATE installation.
  4. Right click on the project:
    • Properties -> Java Build Path -> Libraries -> Add Library -> User Library -> GATE -> Finish -> OK
  5. Again, right click on the project, go to Properties -> Java Compiler:
    • Make sure that "Compiler compliance level", "Generated .class files compatibility" and "Source Compatibility" are 1.6 or higher.

Known issues

  1. When JDE configuration is completed, because of step 5, Eclipse may ask us to rebuild the project. Of course, we have to do so, but this operation might rewrite all bin project directory.
  2. Whether we are in this situation or not, we have to make sure of the following:
    • Go to the /bin/processingResources/ and /bin/webProcessingResources/ directories of the project:
      • There should be a .jar for each .class with the same name.
        • If there is not, go to the project in Eclipse, right click on the corresponding .java -> Export -> Java -> JAR File
      • There should be a file named creole.xml in each directory with the following structure: <CREOLE-DIRECTORY><CREOLE> <RESOURCE> <NAME>Name of the module/resource</NAME> <CLASS>processingResources.NameOfTheClass or webProcessingResources.NameOfTheClass</CLASS> </RESOURCE> <RESOURCE> <NAME>Name of the module/resource 2</NAME> <CLASS>processingResources.NameOfTheClass2 or webProcessingResources.NameOfTheClass2</CLASS> </RESOURCE> ... </CREOLE></CREOLE-DIRECTORY>
        • If there are not, create them or simply download them from here and here.

Execute Financial Sentiment Analysis example

If everything has been configured right, you would be able to run this example:

Go to the Project Explorer -> src -> Package examples -> Right click on FinancialSentimentAnalysis.java -> Run as -> Java Application.

You should see something like this: Spanish Financial Sentiment Analysis Example

At this point, maybe you are interested in knowing what each processing resource and the modules that groups them do. For more information about the processing resources click here.

⚠️ **GitHub.com Fallback** ⚠️