C
- the class of this core.public abstract class CoreDataPoint<C extends de.unibi.techfak.scie.descriptors.Annotation> extends Object implements DataPoint
Modifier and Type | Class and Description |
---|---|
static class |
CoreDataPoint.CoreTrainingDataReader<C extends de.unibi.techfak.scie.descriptors.Annotation>
The CoreTrainingDataReader is pretty straightforward and just creates one
DataPoint for each instance of the core class.
|
Constructor and Description |
---|
CoreDataPoint(C core,
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() |
FeatureMap |
getFeatureRepresentation(FeatureDictionary dict,
boolean addFeaturesToDictionary)
Returns a FeatureMap representing this CoreDataPoint sparsely.
|
org.apache.uima.jcas.JCas |
getJcas() |
int |
hashCode() |
String |
toString() |
public CoreDataPoint(C core, org.apache.uima.jcas.JCas jcas)
public C getCore()
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.