org.apache.ctakes.relationextractor.eval
Class RelationExtractorEvaluation

java.lang.Object
  extended by org.cleartk.eval.Evaluation_ImplBase<java.io.File,org.cleartk.eval.AnnotationStatistics<java.lang.String>>
      extended by org.apache.ctakes.relationextractor.eval.RelationExtractorEvaluation

public class RelationExtractorEvaluation
extends org.cleartk.eval.Evaluation_ImplBase<java.io.File,org.cleartk.eval.AnnotationStatistics<java.lang.String>>


Nested Class Summary
static class RelationExtractorEvaluation.Options
           
static class RelationExtractorEvaluation.ParameterSettings
          Holds a set of parameters for a relation extraction model
static class RelationExtractorEvaluation.ReplaceCTakesEntityMentionsAndModifiersWithGold
          Annotator that removes cTAKES EntityMentions and Modifiers from the system view, and copies over the manually annotated EntityMentions and Modifiers from the gold view.
static class RelationExtractorEvaluation.ReplaceGoldEntityMentionsAndModifiersWithCTakes
           
 
Field Summary
static java.lang.String GOLD_VIEW_NAME
           
 
Fields inherited from class org.cleartk.eval.Evaluation_ImplBase
baseDirectory
 
Constructor Summary
RelationExtractorEvaluation(java.io.File baseDirectory, java.lang.Class<? extends RelationExtractorAnnotator> classifierAnnotatorClass, java.lang.Class<? extends org.cleartk.classifier.DataWriter<java.lang.String>> dataWriterClass, java.lang.Object[] additionalParameters, java.lang.String[] trainingArguments)
          An evaluation of a relation extractor.
 
Method Summary
 org.apache.uima.collection.CollectionReader getCollectionReader(java.util.List<java.io.File> items)
           
static void main(java.lang.String[] args)
           
protected  org.cleartk.eval.AnnotationStatistics<java.lang.String> test(org.apache.uima.collection.CollectionReader collectionReader, java.io.File directory)
           
 void train(org.apache.uima.collection.CollectionReader collectionReader, java.io.File directory)
           
 
Methods inherited from class org.cleartk.eval.Evaluation_ImplBase
crossValidation, selectFoldTestItems, selectFoldTrainItems, trainAndTest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GOLD_VIEW_NAME

public static final java.lang.String GOLD_VIEW_NAME
See Also:
Constant Field Values
Constructor Detail

RelationExtractorEvaluation

public RelationExtractorEvaluation(java.io.File baseDirectory,
                                   java.lang.Class<? extends RelationExtractorAnnotator> classifierAnnotatorClass,
                                   java.lang.Class<? extends org.cleartk.classifier.DataWriter<java.lang.String>> dataWriterClass,
                                   java.lang.Object[] additionalParameters,
                                   java.lang.String[] trainingArguments)
An evaluation of a relation extractor.

Parameters:
baseDirectory - The directory where models, etc. should be written
classifierAnnotatorClass - The CleartkAnnotator class that learns a relation extractor model
dataWriterClass - The DataWriter defining what type of classifier to train
additionalParameters - Additional parameters that should be supplied when creating the CleartkAnnotator
trainingArguments - Arguments that should be passed to the classifier's train method
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

getCollectionReader

public org.apache.uima.collection.CollectionReader getCollectionReader(java.util.List<java.io.File> items)
                                                                throws java.lang.Exception
Specified by:
getCollectionReader in class org.cleartk.eval.Evaluation_ImplBase<java.io.File,org.cleartk.eval.AnnotationStatistics<java.lang.String>>
Throws:
java.lang.Exception

train

public void train(org.apache.uima.collection.CollectionReader collectionReader,
                  java.io.File directory)
           throws java.lang.Exception
Specified by:
train in class org.cleartk.eval.Evaluation_ImplBase<java.io.File,org.cleartk.eval.AnnotationStatistics<java.lang.String>>
Throws:
java.lang.Exception

test

protected org.cleartk.eval.AnnotationStatistics<java.lang.String> test(org.apache.uima.collection.CollectionReader collectionReader,
                                                                       java.io.File directory)
                                                                throws java.lang.Exception
Specified by:
test in class org.cleartk.eval.Evaluation_ImplBase<java.io.File,org.cleartk.eval.AnnotationStatistics<java.lang.String>>
Throws:
java.lang.Exception