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

Class TriggerFeatureBuilder

source code

FeatureBuilder.FeatureBuilder --+
                                |
                               TriggerFeatureBuilder

Instance Methods [hide private]
 
__init__(self, featureSet, style=None) source code
 
getMergedEntityType(self, entities)
If a single token belongs to multiple entities of different types, a new, composite type is defined.
source code
 
getTokenFeatures(self, token, sentenceGraph)
Returns a list of features based on the attributes of a token.
source code
 
buildLinearOrderFeatures(self, sentenceGraph, index, tag)
Linear features are built by marking token features with a tag that defines their relative position in the linear order.
source code
 
initSentence(self, sentenceGraph)
Build one example for each token of the sentence
source code
 
buildFeatures(self, token, linear=True, chains=True) source code
 
buildAttachedEdgeFeatures(self, token, sentenceGraph) source code
 
buildChains(self, token, sentenceGraph, depthLeft=3, chain='', visited=None) source code

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

Method Details [hide private]

__init__(self, featureSet, style=None)
(Constructor)

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

getMergedEntityType(self, entities)

source code 

If a single token belongs to multiple entities of different types, a new, composite type is defined. This type is the alphabetically ordered types of these entities joined with '---'.

getTokenFeatures(self, token, sentenceGraph)

source code 

Returns a list of features based on the attributes of a token. These can be used to define more complex features.

Parameters:
  • token - a word token
  • sentenceGraph - the sentence to which the token belongs
Overrides: FeatureBuilder.FeatureBuilder.getTokenFeatures