Log in Help
Print
Homewiki 〉 gate-user-faq.html
 

GATE Users - Frequently Asked Questions (FAQ)

Contents

1. Getting Help and Reporting Bugs

1.1. Where can I find more documentation, help or support? [#]

Look at the rest of the wiki, the overview of GATE Documentation and especially the user guide.

You can view the whole user guide in a single web page for easier searching. Finally, search the mailing list or ask your question on the list. Or consider getting help from the experts.

1.2. I have asked a question on the mailing list but did not get any answer! [#]

Answers on the mailing list are provided for free and often in their spare time by enthusiastic GATE users and developers. There are many possible reasons why your question did not receive an answer:

Before re-sending your question, please let some time pass and make sure your question contains all the information you can give about your problem: include the version of your operating system, Java, GATE, include examples.

If you need to get difficult problems solved in a timely manner, consider getting help from the experts.

1.3. I found a bug - what to do? [#]

Are you sure it is indeed a bug? Are you sure it is a bug in GATE? Are you sure you do not use GATE with other software that might cause JAR version conflicts? In the unlikely case that this really could be a bug, try to find the exact steps that always reproduce the bug. Try to create a self-contained minimal testcase: a directory that contains all files but only the minimum number of files necessary so that somebody else can reproduce the bug. Then, ask about the problem on the mailing list or directly submit a bug report. Be sure to include at least the following information:

2. Running GATE Developer

2.1. I don’t see the Java console messages under Windows [#]

Note that the gate.exe script uses javaw.exe to run GATE which means that you will see no console for the java process. If you have problems starting GATE and you would like to be able to see the console to check for messages then you should run GATE from the command line.

2.2. When I execute GATE, nothing happens [#]

You might get some clues if you start GATE from the command line. On Windows open a command prompt (Start menu -> Run -> cmd), on Linux open your favourite terminal program, navigate to your GATE installation directory, and run
java -Xmx1200m -jar bin/gateLauncher.jar

On Mac OS X, open Terminal.app, navigate to your GATE installation directory and run
GATE.app/Contents/MacOS/GATE

This will allow you to see all error messages GATE generates.

2.3. On Ubuntu, GATE is very slow or doesn’t start [#]

GATE and many other Java applications are known not to work with GCJ.

Make sure you have either OpenJDK or the official Sun/Oracle version of Java 6 installed. OpenJDK is available as the openjdk-6-jdk package in the Ubuntu repository, and can be installed using Synaptic, apt-get, or any other package manager

sudo apt-get install openjdk-6-jdk

Make sure that your default Java version is the OpenJDK one. You can do this by running: sudo update-java-alternatives -l

This will list the installed Java VMs. You should see ‘java-6-openjdk’ as one of the options.

Then you should run : sudo update-java-alternatives -s java-6-openjdk

to set it as your default.

Finally, try GATE again.

2.4. How to use GATE on a 64 bit system? [#]

32-bit vs. 64-bit is a matter of the JVM rather than the build of GATE.

For example, on Mac OS X, either use Applications/Utilities/Java Preferences and put one of the 64-bit options at the top of the list, or run GATE from the terminal using Java 1.6.0 (which is 64-bit only on Mac OS): export JAVA_HOME= /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

bin/ant run

2.5. I keep getting an OutOfMemoryException - what to do? [#]

GATE comes preconfigured to use a conservative amount of start and maximum heapsize (200M and 1G at the time of this writing). How you change these parameters depends on how you are starting GATE Developer.

For gate.exe on Windows, Java command line arguments are specified in the file gate.l4j.ini which can be found alongside gate.exe in the top-level GATE installation directory. By default this file contains

-Xmx1200m
-Xms200m

-Xmx specifies the maximum heap size in megabytes (m) or gigabytes (g), and -Xms specifies the initial size. Other parameters of interest are -XX:MaxPermSize=128m for the "permanent generation", which you may wish to specify if you are getting OutOfMemoryErrors that say "PermGen space".

On other platforms, including Mac OS X, these parameters are set by the bin/gate.sh bash script. You can either edit the script directly or you can simply pass the -X... parameters to the script when you call it (from the command line or from a desktop shortcut or menu option).

Using the * and + quantifiers on common annotations, especially Token, is a common cause of slow performance and OutOfMemory exceptions in JAPE transducers. See the Optimising section of the User Guide for more details.

2.6. I got the error: Could not reserve enough space for object heap [#]

You may need to reduce the default GATE memory allocations, as described in the previous question. Note that when running GATE (or any Java application) on a 32-bit JVM the maximum value that you can use for -Xmx is around 1200m. If your application requires more heap space than that you will need to use a 64-bit operating system and JVM.

2.7. From Eclipse, I got the error: java.lang.OutOfMemoryError: Java heap space [#]

Configuring xms and xmx parameters in eclipse.ini file just adds memory to your Eclipse process. If you start a Java application from within Eclipse, that will run in a different process.

To give more memory to your application, as opposed to just to Eclipse, you need to add those values in the ‘VM Arguments’ section of the run application dialog: lower pane, in the second tab of ‘Run Configurations’ dialog.

2.8. I got the error: log4j:WARN No appenders could be found for logger... [#]

This may occur if you start GATE Developer or an application using GATE Embedded in a way so that the directory ’GATE_HOME/bin’ is not in the Java classpath and you did not specify a valid URL for the system property log4j.configuration either. The log4j logging component uses either the file whose URL is specified with the property log4j.configuration or a file named log4j.properties from the classpath for configuration. A quick fix for this problem is usually to copy the file ’GATE_HOME/bin/log4j.properties’ file to a directory which is part of the classpath of your project.

2.9. How to use GATE in multiple windows or for multiple projects? [#]

You can run several copies of GATE Developer at the same time or use GATE developer for different projects. By default, all copies will use the same pair of user-specific config/session files which get saved when GATE exits. This may overwrite the settings of another session. Under Linux or any OS that supports bash script you can use the gate.sh command with the command line argument -ln to make GATE use a specific set of config/session files, see the user guide.

3. GATE Developer User Interface

3.1. How to manually annotate faster in the document editor? [#]

If you need to manage a team of annotators you should consider GATE Teamware.

Here are some tips to be more efficient with the document editor in GATE Developer.

3.2. Step by step annotation curation process [#]

3.3. I got the error: HighlightData cannot be cast to ...HighlightInfo [#]

That’s a recurring problem when editing a document with annotation highlights showing and it usually involves inserting/deleting some text close or belonging to an annotation in the first place.

The current solutions are to hide the annotation highlights before to edit the text or use document read-only mode so you can only edit annotations or hide then show again the document after the error.

3.4. Text is incorrectly refreshed after scrolling and become unreadable [#]

Change the look and feel used in GATE with menu ‘Options’ then ‘Configuration’. Restart GATE and try again. We use mainly ‘Metal’ and ‘Nimbus’ without problem.

Change the video driver you use.

Update Java.

4. GATE Core

4.1. Can I use a gazetteer to match the stem or lemma of words? [#]

Yes - use the Flexible Gazetteer for this.

4.2. How do I create RDF with GATE? [#]

That depends on what you mean exactly by "create RDF". GATE comes with the Ontology plugin which provides an API for manipulating OWL-Lite ontologies which can be serialized as RDF/RDFS. There is no preprogrammed component or tool that will automatically populate an ontology from text: GATE is a tool that allows you to implement such applications.

Also, one should distinguish between creating generic RDF graphs and ontological entities formulated in OWL. The GATE ontology plugin supports Ontologies in a language that is close to to the OWL-Lite sublanguage.

One option that might be interesting to you is the OwlExporter plugin from the Semantic Software Lab: http://www.semanticsoftware.info/owlexporter

Apart from that there is always the option to use either JAPE Java right-hand-sides or your own Processing Resource written in Java to go through the annotations of interest and create RDF or OWL using either the Ontology plugin or some RDF/Ontology library of your choice (e.g. RDF2GO or OWLAPI).

4.3. I have loaded my Ontology but now I cannot see some classes / anything at all? [#]

The Ontology plugin only supports ontologies that conform to the OWL-Lite sublanguage. The plugins makes attempts to also show information for ontologies that do not fully conform to OWL-Lite, but there is no guarantee that this will work as expected. For example, if your Ontology is in OWL-DL, classes that are subclasses of restrictions supported in OWL-Lite will likely be shown, but classes that are subclasses of other restrictions cannot be shown because there is no way in the Ontology API to represent such restrictions. Similarly, plain RDF/RDFS files will not be shown correctly as the API has no way of representing many constructs that are allowed in plain RDF but not allowed in OWL-Lite.

5. GATE Plugins

5.1. Is there a list of contributed plugins? [#]

There is an incomplete list at the end of the list of core plugins.

5.2. An error occurred when running the TreeTagger plugin [#]

The TreeTagger plugin isn’t supported anymore. However, the TaggerFramework plugin provides support for TreeTagger. Try using that plugin instead. See section 21.3.

6. GATE Embedded

6.1. I get annotations in a strange/random order! [#]

This is because you get the annotations from an AnnotationSet, which is, as their name suggests, a sets. A set by it's very nature is unordered. To get annotations in the order they occur in the document then you need them in a list not a set. To get the annotations in a list sorted by increasing start offset use the following code:

List<Annotation> anns = gate.Utils.inDocumentOrder(originalAnnotationSet;
for(Annotation ann : anns) { 
 ...
}

For more complex ways of sorting, you need to use your own comparator with Collection.sort.