GATE Users - Frequently Asked Questions (FAQ)
Contents
- 1. Getting Help and Reporting Bugs
- 1.1. Where can I find more documentation, help or support? [#]
- 1.2. I have asked a question on the mailing list but did not get any answer! [#]
- 1.3. I found a bug - what to do? [#]
- 2. Running GATE Developer
- 2.1. I don’t see the Java console messages under Windows [#]
- 2.2. When I execute GATE, nothing happens [#]
- 2.3. On Ubuntu, GATE is very slow or doesn’t start [#]
- 2.4. How to use GATE on a 64 bit system? [#]
- 2.5. I keep getting an OutOfMemoryException - what to do? [#]
- 2.6. I got the error: Could not reserve enough space for object heap [#]
- 2.7. From Eclipse, I got the error: java.lang.OutOfMemoryError: Java heap space [#]
- 2.8. On MacOS, I got the error: java.lang.OutOfMemoryError: Java heap space [#]
- 2.9. I got the error: log4j:WARN No appenders could be found for logger... [#]
- 2.10. How to use GATE in multiple windows or for multiple projects? [#]
- 3. GATE Developer User Interface
- 3.1. How to manually annotate faster in the document editor? [#]
- 3.2. Step by step annotation curation process [#]
- 3.3. I got the error: HighlightData cannot be cast to ...HighlightInfo [#]
- 3.4. Text is incorrectly refreshed after scrolling and become unreadable [#]
- 4. GATE Core
- 4.1. Can I use a gazetteer to match the stem or lemma of words? [#]
- 4.2. How do I create RDF with GATE? [#]
- 4.3. I have loaded my Ontology but now I cannot see some classes / anything at all? [#]
- 5. GATE Plugins
- 5.1. Is there a list of contributed plugins? [#]
- 5.2. An error occurred when running the TreeTagger plugin [#]
- 6. GATE Embedded
- 6.1. I get annotations in a strange/random order! [#]
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:
- maybe you did not wait long enough, people are busy with their jobs. Wait some more.
- maybe your email does not make it easy enough understand your problem. Be sure to include all relevant information, including source code excerpts, JAPE rules, links to test documents. The easier it is to understand your email and to reconstruct your situation the bigger the chances to get an answer. If people on the list do not understand your email they will rarely ask back.
- nobody knows the 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:
- Your operating system name, version and architecture (e.g. Ubuntu 10.4 32bit, Windows 7 64 bit)
- Your Java version, ideally the full output of the command "java -version"
- The exact version and build number of GATE (this is shown in the title bar of the GATE Developer GUI)
- Ideally the console output of GATE
- The exact steps to reproduce the bug
- Ideally a zip file with the minimal test case
2. Running GATE Developer
2.1. I don’t see the Java console messages under Windows [#]
Note that the gate.bat 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 edit the gate.bat script and replace javaw.exe with java.exe in the definition of the JAVA environment variable.
2.2. When I execute GATE, nothing happens [#]
You might get some clues if you start GATE from the command line, using: bin/ant -Druntime.spawn=false run
which 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, the open-source Java SDK or others non SUN Java SDK.
Make sure you have the official version of Java installed. Provided by Sun, the package is named ‘sun-java6-jdk’ in Synaptic.
To install it, run in a terminal: sudo apt-get install sun-java6-jdk
Make sure that your default Java version is the one from SUN. You can do this by running: sudo update-java-alternatives -l
This will list the installed Java VMs. You should see ‘java-6-sun’ as one of the options.
Then you should run : sudo update-java-alternatives -s java-6-sun
to set the ‘java-6-sun’ 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 heapsixe (200M and 900M at the time of this writing). GATE does not use any settings from the JAVA_OPTS environment variable. Instead you must set the Java properties runtime.start.memory and runtime.max.memory. This can be done in several ways:
- add them to a file build.properties in the root directory of the GATE installation
- if GATE is started with the ant command, set them using the command line parameter -D, for example ant -D runtime.max.memory=3G run
- if GATE is started on Linux with the gate.sh command, set them using the command line parameter -D, for example gate.sh -D runtime.max.memory=3G
- if GATE is started on Linux with the gate.sh command, set them in some user properties file and use the command line parameter -propertyfile to make GATE use that file instead of the default from the installation directory. For example gate.sh -propertyfile ./myown.properties
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 [#]
GATE doesn’t use the JAVA_OPTS variable. The default memory allocations are defined in the gate/build.xml file but you can override them by creating a file called build.properties in the same directory with these lines:
runtime.start.memory=256m runtime.max.memory=1048m
If you start GATE by running bin/ant run you can also overwrite these properties by using the ant command line option -D, e.g.: ./bin/ant run -Druntime.start.memory=256m -Druntime.max.memory=1048m
On Linux, when using the bin/gate.sh command or a link to it to start GATE, you can add these parameters to the command line arguments using the -D option, e.g.: gate.sh -Druntime.start.memory=256m -Druntime.max.memory=1048m
If you don’t use ant to start GATE but your own application directly with the ‘java’ executable then you must use something like: java -Xmx512m -classpath <your classpath here> <yourClassName>
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. On MacOS, I got the error: java.lang.OutOfMemoryError: Java heap space [#]
You can try to set the environment variable ANT_OPTS to allow for more memory as follows: export ANT_OPTS=-Xmx1024m
2.9. 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.10. 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.
- Keyboard shortcuts
- place the caret on an annotation then hit control+E
- control+S save the document
- control+F4 close the document
- look at the icon tooltips in the annotation editor popup window
- Document Editor configuration
- click on the black triangle menu at the top-right corner of the document editor
- use "Save Current Layout" when you want to save the view and highlighted annotations
- tick the checkbox "Restore Layout Automatically"
(now the views and annotations will be automatically selected for each new document you show) - tick the checkbox "Read-only" to avoid modifying the document text
- Annotation List view
- sort the table by any column by clicking on its headers
- you can select annotations with the text field at the bottom
- right-click on a row to edit the annotation
- Annotation Stack view
- this view is very useful when working with overlapping annotations
- alt + right /left to move the caret to the next / previous annotation
- right click to edit an annotation
- double click on an annotation to copy it to another annotation set
- control shift click to delete a annotation
- tick the checkbox to skip non overlapping annotations
- double click on a annotation type in the first column to set the feature value to display
- control click on a feature containing a URL to display it in the browser
- Schema annotation editor
- schema annotation editor show you predefined annotation types and features
- you don't have to type anymore the type or feature name
- Search and annotate tool of the annotation editor
- choose an annotation as model and use it to annotate all the further matches of a search
3.2. Step by step annotation curation process [#]
- create a corpus then fill it from a directory by right-clicking on it then choose "populate"
- open one document and show only the views and annotations you want to work with
- use the document editor triangle menu to save the layout and check "restore automatically" and "read-only"
- select 20 or more documents in the resources tree then right-click "Show all" or press Enter
- use the list view (up/down) or stack view (alt+right/left) to go from one annotation to the other
- edit an annotation by right clicking in the views or control+E in the document
- delete an annotation by using delete in the list view or control+shift in the stack view
- save your document with control+S then close it with control+F4
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.




