Package TEES :: Package ExampleBuilders :: Module EntityExampleBuilder :: Class EntityExampleBuilder
[hide private]

Class EntityExampleBuilder

source code

ExampleBuilder.ExampleBuilder --+
                                |
                               EntityExampleBuilder

Instance Methods [hide private]
 
__init__(self, style=None, classSet=None, featureSet=None, gazetteerFileName=None, skiplist=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, features)
Linear features are built by marking token features with a tag that defines their relative position in the linear order.
source code
 
buildLinearNGram(self, i, j, sentenceGraph, features) source code
 
buildExamplesFromGraph(self, sentenceGraph, outfile, goldGraph=None)
Build one example for each token of the sentence
source code
 
buildChains(self, token, sentenceGraph, features, depthLeft=3, chain='', visited=None) source code
 
getNamedEntityHeadTokens(self, sentenceGraph) source code
 
buildPOSPairs(self, token, namedEntityHeadTokens, features) source code

Inherited from ExampleBuilder.ExampleBuilder: calculatePredictedRange, definePredictedValueRange, getElementCounts, getParameters, getPredictedValueRange, getSentences, processCorpus, processDocument, processSentence, saveIds, setFeature

Class Methods [hide private]

Inherited from ExampleBuilder.ExampleBuilder: getIdSets, run

Method Details [hide private]

__init__(self, style=None, classSet=None, featureSet=None, gazetteerFileName=None, skiplist=None)
(Constructor)

source code 
Overrides: ExampleBuilder.ExampleBuilder.__init__

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.

buildExamplesFromGraph(self, sentenceGraph, outfile, goldGraph=None)

source code 

Build one example for each token of the sentence

Overrides: ExampleBuilder.ExampleBuilder.buildExamplesFromGraph