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. I keep getting an OutOfMemoryException - what to do? [#]
- 2.5. I got the error: Could not reserve enough space for object heap [#]
- 2.6. From Eclipse, I got the error: java.lang.OutOfMemoryError: Java heap space [#]
- 2.7. I got the error: log4j:WARN No appenders could be found for logger... [#]
- 2.8. 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.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 -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.
We recommend OpenJDK 8 or later to run GATE Developer, you may be able to install it as the openjdk-8-jdk package in the Ubuntu repository using Synaptic, apt-get, or any other package manager
sudo apt-get install openjdk-8-jdk
Or you can download OpenJDK packages from many third party suppliers, such as https://adoptopenjdk.net or https://www.azul.com/downloads/zulu-community/
2.4. I keep getting an OutOfMemoryException - what to do? [#]
GATE uses the Java defaults for memory allocation, however if these are not appropriate for your use case you can change the parameters 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.
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.5. 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.6. 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.7. 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.8. 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.