gate
Class CookBook

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--gate.CookBook
All Implemented Interfaces:
junit.framework.Test

public class CookBook
extends junit.framework.TestCase

This class provides examples of using the GATE APIs. Read this documentation along with a copy of the source code.

The CookBook is set up as part of the GATE test suite (using the


Field Summary
(package private)  Corpus corpus
          A corpus
private static boolean DEBUG
          Debug flag
(package private)  Document doc1
          A document
(package private)  Document doc2
          Another document
private static String usage
          String to print when wrong command-line args
 
Fields inherited from class junit.framework.TestCase
fName
 
Constructor Summary
CookBook(String name)
          Construction
 
Method Summary
static void main(String[] args)
          Main function: an example of embedding GATE-based batch processing.
 void setUp()
          Fixture set up: initialise members before each test method
static junit.framework.Test suite()
          Test suite routine for the test runner
 void testAddingAnnotations()
          Adding annotations to documents
 void testAddingDocuments()
          Adding documents to a corpus
 void testCorpusConstruction()
          Constructing a corpus
 void testResourceCreation()
          Constructing a resource
 void testUsingFeatures()
          Using the FeatureMap interface
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
Debug flag

corpus

Corpus corpus
A corpus

doc1

Document doc1
A document

doc2

Document doc2
Another document

usage

private static String usage
String to print when wrong command-line args
Constructor Detail

CookBook

public CookBook(String name)
Construction
Method Detail

testResourceCreation

public void testResourceCreation()
                          throws GateException
Constructing a resource

testCorpusConstruction

public void testCorpusConstruction()
                            throws GateException
Constructing a corpus

testAddingDocuments

public void testAddingDocuments()
                         throws GateException
Adding documents to a corpus

testAddingAnnotations

public void testAddingAnnotations()
Adding annotations to documents

testUsingFeatures

public void testUsingFeatures()
Using the FeatureMap interface

main

public static void main(String[] args)
                 throws Exception
Main function: an example of embedding GATE-based batch processing. The method:

setUp

public void setUp()
           throws GateException,
                  IOException
Fixture set up: initialise members before each test method
Overrides:
setUp in class junit.framework.TestCase

suite

public static junit.framework.Test suite()
Test suite routine for the test runner