readTrainingData
public 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. Note that the rawRelationInstances are treated as
positive examples.
Any additional information that might be required for constructing
training data has to be set in the constructor of the implementing class.
Also note that the space of possible negative data points might indeed be
huge. Thus implementing classes might choose to restrict the number of
negative data points by heuristics as maximum distance.
The contract of this interface, however, garantuees that no positive
examples specified in the rawRelationInstances are also constructed as
negative training data.
- Specified by:
readTrainingData
in interface TrainingDataReader
- Parameters:
jcas
- an XCAS document given as JCas.rawRelationInstances
- a Collection of RawRelations that are treated
as positive Training examples.