Package TEES :: Package ExampleBuilders :: Package FeatureBuilders :: Module BioInferOntologyFeatureBuilder :: Class BioInferOntologyFeatureBuilder
[hide private]

Class BioInferOntologyFeatureBuilder

source code

FeatureBuilder.FeatureBuilder --+
                                |
                               BioInferOntologyFeatureBuilder

Instance Methods [hide private]
 
__init__(self, featureSet) source code
 
getTokenAnnotatedType(self, token, sentenceGraph)
Multiple entities may have the same head token.
source code
 
buildOntologyFeaturesForPath(self, sentenceGraph, pathTokens, pathEdges=None) source code
 
buildOntologyFeatures(self, term, tag='') source code
 
getParents(self, term) source code

Inherited from FeatureBuilder.FeatureBuilder: getEntityType, getPOSSuperType, getTokenFeatures, normalizeFeatureVector, setFeature, setFeatureVector, setTag

Method Details [hide private]

__init__(self, featureSet)
(Constructor)

source code 
Parameters:
  • featureSet - feature ids
Overrides: FeatureBuilder.FeatureBuilder.__init__
(inherited documentation)

getTokenAnnotatedType(self, token, sentenceGraph)

source code 

Multiple entities may have the same head token. This returns a list of the types of all entities whose head token this token is. If the FeatureBuilder.maximum flag is set, the list is truncated to a length of two, otherwise to a length of one. This is done because when token features (to which the annotated type belongs to) are combined into other features, a large number of annotated type features can lead to an exponential increase in the number of features.

Overrides: FeatureBuilder.FeatureBuilder.getTokenAnnotatedType
(inherited documentation)