C
- core class.public abstract static class RelationDataPoint.RelationTrainingDataReader<C extends de.unibi.techfak.scie.descriptors.Annotation> extends Object implements TrainingDataReader
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DIST_LIMIT |
static int |
MAX_SLOT_CANDIDATES |
Constructor and Description |
---|
RelationDataPoint.RelationTrainingDataReader(Class<C> coreClass,
Classifier coreClassifier,
String rawRelationClass) |
Modifier and Type | Method and Description |
---|---|
abstract CoreDataPoint<C> |
createCoreDataPoint(C core,
org.apache.uima.jcas.JCas jcas)
This method should create a CoreDataPoint given a core instance.
|
abstract CoreSlotCombinationDataPoint<C,? extends de.unibi.techfak.scie.descriptors.Annotation> |
createCoreSlotCombinationDataPoint(SlotSpecification spec,
C core,
de.unibi.techfak.scie.descriptors.Annotation slot,
org.apache.uima.jcas.JCas jcas)
This method should create a CoreSlotCombination given a
SlotSpecification, a core instance and a Slot instance.
|
abstract RelationDataPoint<C> |
createDataPoint(C core,
ClassificationResult coreClassification,
SlotCandidate[] slotCandidates,
org.apache.uima.jcas.JCas jcas)
This method should create a RelationDataPoint given a core instance,
a core classification and Candidates for all slots (note that the
candidates might be null).
|
Class<C> |
getCoreClass() |
Classifier |
getCoreClassifier() |
int |
getDistLimit() |
String |
getRawRelationClass() |
ArrayList<SlotSpecification> |
getSlotSpecifications() |
void |
readTrainingData(org.apache.uima.jcas.JCas jcas,
Collection<RawRelation> rawRelationInstances,
Collection<LabeledDataPoint> trainingDataCollection)
This constructs training data for the given combination of XCAS document
and RawRelations and writes them to the given collection of
LabeledDataPoints.
|
void |
setDistLimit(int distLimit) |
public static final int MAX_SLOT_CANDIDATES
public static final int DEFAULT_DIST_LIMIT
public RelationDataPoint.RelationTrainingDataReader(Class<C> coreClass, Classifier coreClassifier, String rawRelationClass)
public Classifier getCoreClassifier()
public String getRawRelationClass()
public ArrayList<SlotSpecification> getSlotSpecifications()
public int getDistLimit()
public void setDistLimit(int distLimit)
public void readTrainingData(org.apache.uima.jcas.JCas jcas, Collection<RawRelation> rawRelationInstances, Collection<LabeledDataPoint> trainingDataCollection)
readTrainingData
in interface TrainingDataReader
jcas
- an XCAS document given as JCas.rawRelationInstances
- a Collection of RawRelations that are treated
as positive Training examples.public abstract RelationDataPoint<C> createDataPoint(C core, ClassificationResult coreClassification, SlotCandidate[] slotCandidates, org.apache.uima.jcas.JCas jcas)
core
- a core instance.coreClassification
- the classification of that core instance
including the classification confidence (the label will be true).slotCandidates
- the candidates for each slot. Note that each
entry
of that array might be null if the slot is not filled.jcas
- the current JCas object.public abstract CoreDataPoint<C> createCoreDataPoint(C core, org.apache.uima.jcas.JCas jcas)
core
- a core instance.jcas
- the current JCas object.public abstract CoreSlotCombinationDataPoint<C,? extends de.unibi.techfak.scie.descriptors.Annotation> createCoreSlotCombinationDataPoint(SlotSpecification spec, C core, de.unibi.techfak.scie.descriptors.Annotation slot, org.apache.uima.jcas.JCas jcas)
spec
- the current SlotSpecification.core
- the current Core instance.slot
- the current slot instance.jcas
- the current JCas object.Copyright © 2014. All rights reserved.