public class AssertionEvaluation extends
Modifier and Type | Class and Description |
---|---|
(package private) static class |
AssertionEvaluation.Corpus |
static class |
AssertionEvaluation.HashableAnnotation |
static class |
AssertionEvaluation.OnlyGoldAssertions
Class that copies the manual
Modifier annotations to the default CAS. |
static class |
AssertionEvaluation.Options |
static class |
AssertionEvaluation.ReferenceAnnotationsSystemAssertionClearer
Class that copies the manual
Modifier annotations to the default CAS. |
static class |
AssertionEvaluation.ReferenceIdentifiedAnnotationsSystemToGoldCopier
Class that copies the manual
Modifier annotations to the default CAS. |
static class |
AssertionEvaluation.ReferenceSupportingAnnotationsSystemToGoldCopier
Class that copies the manual
Modifier annotations to the default CAS. |
static class |
AssertionEvaluation.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.
|
(package private) class |
AssertionEvaluation.StringInstanceDataWriter |
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<java.lang.String> |
annotationTypes |
private java.lang.Class<? extends |
dataWriterClass |
private static java.io.File |
evaluationLogFile |
private static java.io.BufferedWriter |
evaluationLogFileOut |
static java.lang.String |
evaluationLogFilePath |
private java.io.File |
evaluationOutputDirectory |
static java.lang.String |
GOLD_VIEW_NAME |
private boolean |
ignoreAnatomicalSites |
private static Logger |
logger |
protected static AssertionEvaluation.Options |
options |
private java.lang.String[] |
trainingArguments |
static boolean |
useEvaluationLogFile |
private static java.lang.String |
YTEX_NEGATION_DESCRIPTOR |
Constructor and Description |
---|
AssertionEvaluation(java.io.File modelDirectory,
java.io.File evaluationOutputDirectory,
java.util.ArrayList<java.lang.String> annotationTypes,
java.lang.Class<? extends |
Modifier and Type | Method and Description |
---|---|
private static void |
addCleartkAttributeAnnotatorsToAggregate(java.io.File directory,
AggregateBuilder builder) |
private static void |
addExternalAttributeAnnotatorsToAggregate(AggregateBuilder builder) |
private static java.lang.String |
formatError(JCas jcas,
IdentifiedAnnotation mention) |
CollectionReader |
getCollectionReader(java.util.List<java.io.File> items) |
protected java.lang.Class<? extends |
getDataWriterClass() |
private static java.lang.Object |
getFeatureValue(Feature feature,
java.lang.Class<? extends java.lang.Object> class1,
Annotation annotation) |
static void |
main(java.lang.String[] args) |
static void |
preprocess(java.io.File rawDir) |
private static void |
printErrors(JCas jCas,
java.util.Collection<IdentifiedAnnotation> goldEntitiesAndEvents,
java.util.Collection<IdentifiedAnnotation> systemEntitiesAndEvents,
java.lang.String classifierType,
java.lang.Object trueCategory,
java.lang.Class<? extends java.lang.Object> categoryClass) |
private static void |
printInstances(JCas jCas,
java.util.Collection<IdentifiedAnnotation> goldEntitiesAndEvents,
java.util.Collection<IdentifiedAnnotation> systemEntitiesAndEvents,
java.lang.String classifierType,
java.lang.Object trueCategory,
java.lang.Class<? extends java.lang.Object> categoryClass,
java.io.File outputfile) |
private static void |
printOptionsForDebugging(AssertionEvaluation.Options optionsArg) |
static void |
printScore(java.util.Map<java.lang.String,AnnotationStatisticsCompact<java.lang.String>> map,
java.lang.String directory) |
private static void |
resetOptions() |
protected java.util.Map<java.lang.String,AnnotationStatisticsCompact<java.lang.String>> |
test(CollectionReader collectionReader,
java.io.File directory) |
void |
train(CollectionReader collectionReader,
java.io.File directory) |
protected void |
trainAndPackage(java.lang.String currentAssertionAttribute,
java.io.File directory,
java.lang.String[] arguments) |
private static Logger logger
private static final java.lang.String YTEX_NEGATION_DESCRIPTOR
protected java.util.ArrayList<java.lang.String> annotationTypes
private java.lang.Class<? extends> dataWriterClass
private java.io.File evaluationOutputDirectory
public static java.lang.String evaluationLogFilePath
private static java.io.File evaluationLogFile
private static java.io.BufferedWriter evaluationLogFileOut
public static boolean useEvaluationLogFile
private boolean ignoreAnatomicalSites
protected static AssertionEvaluation.Options options
private java.lang.String[] trainingArguments
public static final java.lang.String GOLD_VIEW_NAME
public AssertionEvaluation(java.io.File modelDirectory, java.io.File evaluationOutputDirectory, java.util.ArrayList<java.lang.String> annotationTypes, java.lang.Class<? extends> dataWriterClass, java.lang.String... trainingArguments)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
private static void resetOptions()
private static void printOptionsForDebugging(AssertionEvaluation.Options optionsArg)
public static void printScore(java.util.Map<java.lang.String,AnnotationStatisticsCompact<java.lang.String>> map, java.lang.String directory)
public CollectionReader getCollectionReader(java.util.List<java.io.File> items) throws ResourceInitializationException
ResourceInitializationException
public static void preprocess(java.io.File rawDir) throws ResourceInitializationException, UIMAException, java.io.IOException
ResourceInitializationException
UIMAException
java.io.IOException
public void train(CollectionReader collectionReader, java.io.File directory) throws java.lang.Exception
java.lang.Exception
protected java.util.Map<java.lang.String,AnnotationStatisticsCompact<java.lang.String>> test(CollectionReader collectionReader, java.io.File directory) throws java.lang.Exception
java.lang.Exception
protected void trainAndPackage(java.lang.String currentAssertionAttribute, java.io.File directory, java.lang.String[] arguments) throws java.lang.Exception
java.lang.Exception
protected java.lang.Class<? extends> getDataWriterClass()
private static void printErrors(JCas jCas, java.util.Collection<IdentifiedAnnotation> goldEntitiesAndEvents, java.util.Collection<IdentifiedAnnotation> systemEntitiesAndEvents, java.lang.String classifierType, java.lang.Object trueCategory, java.lang.Class<? extends java.lang.Object> categoryClass) throws ResourceProcessException
ResourceProcessException
private static void printInstances(JCas jCas, java.util.Collection<IdentifiedAnnotation> goldEntitiesAndEvents, java.util.Collection<IdentifiedAnnotation> systemEntitiesAndEvents, java.lang.String classifierType, java.lang.Object trueCategory, java.lang.Class<? extends java.lang.Object> categoryClass, java.io.File outputfile) throws ResourceProcessException, java.io.IOException
ResourceProcessException
java.io.IOException
private static java.lang.Object getFeatureValue(Feature feature, java.lang.Class<? extends java.lang.Object> class1, Annotation annotation) throws ResourceProcessException
ResourceProcessException
private static java.lang.String formatError(JCas jcas, IdentifiedAnnotation mention)
private static void addExternalAttributeAnnotatorsToAggregate(AggregateBuilder builder) throws UIMAException, java.io.IOException
UIMAException
java.io.IOException
private static void addCleartkAttributeAnnotatorsToAggregate(java.io.File directory, AggregateBuilder builder) throws UIMAException, java.io.IOException, ResourceInitializationException
UIMAException
java.io.IOException
ResourceInitializationException