gate.creole.annic.test
Class AnnicIndexing

java.lang.Object
  extended by gate.creole.annic.test.AnnicIndexing

public class AnnicIndexing
extends Object

The class is an example of how to index a corpus using the ANNIC functionalities. The class is used by the TestAnnic.java.

Author:
niraj

Field Summary
private  String annotationSetName
          AnnotationSet to index.
private  String baseTokenAnnotationType
          Base Token Annotation Type e.g.
private  Corpus corpus
          Corpus to index.
private  ArrayList<String> featuresToExclude
          Features to exclude from index.
private  LuceneIndexer indexer
          Instance of a Lucene Indexer
private  URL indexOutputDirectoryLocation
          Where to store the index.
private  String indexUnitAnnotationType
          Index Unit Annotation type e.g.
private static long serialVersionUID
          serial version id
 
Constructor Summary
AnnicIndexing()
          Constructor
 
Method Summary
 void execute()
          This method creates a lucene index.
 String getAnnotationSetName()
          Gets the annotation set name to be indexed
 String getBaseTokenAnnotationType()
          Gets the base token annotation type
 Corpus getCorpus()
          Gets the corpus to index
 List getFeaturesToExclude()
          Gets the features of annotation to be excluded from being indexed
 URL getIndexOutputDirectoryLocation()
          Gets the location of index output directory
 String getIndexUnitAnnotationType()
          Gets the Index Unit Annotation type.
 void setAnnotationSetName(String annotationSetName)
          Sets the annotation set name
 void setBaseTokenAnnotationType(String baseTokenAnnotationType)
          Sets the base token annotation type
 void setCorpus(Corpus corpus)
          Sets the corpus to index
 void setFeaturesToExclude(ArrayList<String> featuresToExclude)
          Sets the features of annotations to be excluded from being indexed
 void setIndexOutputDirectoryLocation(URL dir)
          Sets the location of index output directory
 void setIndexUnitAnnotationType(String indexUnitAnnotationType)
          Sets the Index Unit annotation type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
serial version id

See Also:
Constant Field Values

corpus

private Corpus corpus
Corpus to index.


featuresToExclude

private ArrayList<String> featuresToExclude
Features to exclude from index.


indexOutputDirectoryLocation

private URL indexOutputDirectoryLocation
Where to store the index.


annotationSetName

private String annotationSetName
AnnotationSet to index.


baseTokenAnnotationType

private String baseTokenAnnotationType
Base Token Annotation Type e.g. Token


indexUnitAnnotationType

private String indexUnitAnnotationType
Index Unit Annotation type e.g. Sentence


indexer

private LuceneIndexer indexer
Instance of a Lucene Indexer

Constructor Detail

AnnicIndexing

public AnnicIndexing()
              throws IOException
Constructor

Throws:
IOException
Method Detail

execute

public void execute()
             throws ExecutionException
This method creates a lucene index.

Throws:
ExecutionException

getIndexOutputDirectoryLocation

public URL getIndexOutputDirectoryLocation()
Gets the location of index output directory

Returns:

setIndexOutputDirectoryLocation

public void setIndexOutputDirectoryLocation(URL dir)
Sets the location of index output directory

Parameters:
dir -

getAnnotationSetName

public String getAnnotationSetName()
Gets the annotation set name to be indexed

Returns:

setAnnotationSetName

public void setAnnotationSetName(String annotationSetName)
Sets the annotation set name

Parameters:
annotationSetName -

getBaseTokenAnnotationType

public String getBaseTokenAnnotationType()
Gets the base token annotation type

Returns:

setBaseTokenAnnotationType

public void setBaseTokenAnnotationType(String baseTokenAnnotationType)
Sets the base token annotation type

Parameters:
baseTokenAnnotationType -

setCorpus

public void setCorpus(Corpus corpus)
Sets the corpus to index

Parameters:
corpus -

getCorpus

public Corpus getCorpus()
Gets the corpus to index

Returns:

getFeaturesToExclude

public List getFeaturesToExclude()
Gets the features of annotation to be excluded from being indexed

Returns:

setFeaturesToExclude

public void setFeaturesToExclude(ArrayList<String> featuresToExclude)
Sets the features of annotations to be excluded from being indexed

Parameters:
featuresToExclude -

getIndexUnitAnnotationType

public String getIndexUnitAnnotationType()
Gets the Index Unit Annotation type.

Returns:

setIndexUnitAnnotationType

public void setIndexUnitAnnotationType(String indexUnitAnnotationType)
Sets the Index Unit annotation type.

Parameters:
indexUnitAnnotationType -