C
- Core classpublic abstract class RelationDataPoint<C extends de.unibi.techfak.scie.descriptors.Annotation> extends Object implements DataPoint
Modifier and Type | Class and Description |
---|---|
static class |
RelationDataPoint.RelationTrainingDataReader<C extends de.unibi.techfak.scie.descriptors.Annotation>
Thre RelationTrainingDataReader is a highly complex TrainingDataReader to
construct training DataPoints for a RelationClassifier.
|
Constructor and Description |
---|
RelationDataPoint(C core,
ClassificationResult coreClassification,
SlotCandidate[] slots,
org.apache.uima.jcas.JCas jcas) |
Modifier and Type | Method and Description |
---|---|
abstract void |
addSpecialFeatures(FeatureMap stdFeatures,
boolean addFeaturesToDictionary)
This is to be implemented by a subclass to add domain-specific features
to the mix.
|
boolean |
equals(Object obj) |
C |
getCore() |
ClassificationResult |
getCoreClassification() |
FeatureMap |
getFeatureRepresentation(FeatureDictionary dict,
boolean addFeaturesToDictionary)
Returns a FeatureMap representing this RelationDataPoint sparsely.
|
org.apache.uima.jcas.JCas |
getJcas() |
SlotCandidate[] |
getSlots() |
int |
hashCode() |
String |
toString() |
public RelationDataPoint(C core, ClassificationResult coreClassification, SlotCandidate[] slots, org.apache.uima.jcas.JCas jcas)
public C getCore()
public ClassificationResult getCoreClassification()
public SlotCandidate[] getSlots()
public org.apache.uima.jcas.JCas getJcas()
public FeatureMap getFeatureRepresentation(FeatureDictionary dict, boolean addFeaturesToDictionary)
getFeatureRepresentation
in interface DataPoint
dict
- the FeatureDictionary that shall be used.addFeaturesToDictionary
- this should be set to true during
training, because then unknown features should be added to the
FeatureDictionary. Outside training this should be set to false because
then we want to treat every unknown feature as zero implicitly.public abstract void addSpecialFeatures(FeatureMap stdFeatures, boolean addFeaturesToDictionary)
stdFeatures
- featureMap already filled with standard features.addFeaturesToDictionary
- this should be set to true during
training, because then unknown features should be added to the
FeatureDictionary. Outside training this should be set to false because
then we want to treat every unknown feature as zero implicitly.Copyright © 2014. All rights reserved.