bilbo.components.features package¶
Submodules¶
bilbo.components.features.decorator_feature module¶
decorator class
-
class
bilbo.components.features.decorator_feature.
PositionDecorator
(extractor)¶ Bases:
object
PositionDecorator Class
-
class
bilbo.components.features.decorator_feature.
SectionDecorator
(extractor)¶ Bases:
object
SectionDecorator Class
-
class
bilbo.components.features.decorator_feature.
WordDecorator
(extractor)¶ Bases:
object
WordDecorator class
-
class
bilbo.components.features.decorator_feature.
XmlDecorator
(extractor)¶ Bases:
object
SectionDecorator Class
bilbo.components.features.externalfeatures module¶
External feature Class
-
class
bilbo.components.features.externalfeatures.
DictionnaryFeature
(name, filename)¶ Bases:
bilbo.components.features.externalfeatures.ExternalFeature
Get features from dictionnaries
-
create_list
(sequence)¶ Create a liste of token from a sequence
Parameters: sequence – list of token and label associated i.e: [[“token”, “label”], [“token”, “label”]]
-
-
class
bilbo.components.features.externalfeatures.
ExternalFeature
¶ Bases:
object
ExternalFeature CLass generate the feature from external ressources
-
classmethod
factory
(typeft, name, list_name)¶ Chose between single or multiple tokens feature
Parameters: - typeft – simple or multiple
- name – the name of the feature
- list_name – list file
Returns: the right function to call
-
classmethod
-
class
bilbo.components.features.externalfeatures.
ListFeature
(name, list_name)¶ Bases:
bilbo.components.features.externalfeatures.ExternalFeature
ListFeature Class
bilbo.components.features.features module¶
Features
-
class
bilbo.components.features.features.
FeatureHandler
(cfg_file, type_config='ini')¶ Bases:
bilbo.components.component.Extractor
Feature handler
-
format_to_list
(doc)¶
-
loadFonctionsFeatures
()¶ Load function for the features
-
print_features
(doc)¶
-
save_features
(doc)¶ Write the features for each token in the output file specify in the cli
Parameters: doc – document object
-
bilbo.components.features.localfeatures module¶
Local features
-
class
bilbo.components.features.localfeatures.
LocalFeature
¶ Bases:
object
Local features class
-
biblPosition
= <bilbo.components.features.decorator_feature.PositionDecorator object>¶
-
cap
= <bilbo.components.features.decorator_feature.WordDecorator object>¶
-
dash
= <bilbo.components.features.decorator_feature.WordDecorator object>¶
-
initial
= <bilbo.components.features.decorator_feature.WordDecorator object>¶
-
numbersMixed
= <bilbo.components.features.decorator_feature.WordDecorator object>¶
-
bilbo.components.features.regexfeatures module¶
regular expression features
-
class
bilbo.components.features.regexfeatures.
RegexFeature
(name, pattern)¶ Bases:
object
generate features based on regular expressions
bilbo.components.features.xmlfeatures module¶
XML features
-
class
bilbo.components.features.xmlfeatures.
XmlFeature
¶ Bases:
object
Generate feature based on XML datas
-
static
format_xpath
(element, xpath)¶
-
global_boolean
= <bilbo.components.features.decorator_feature.SectionDecorator object>¶
-
italic
= <bilbo.components.features.decorator_feature.XmlDecorator object>¶
-
punc_counter
= <bilbo.components.features.decorator_feature.SectionDecorator object>¶
-
static
Module contents¶
Features generation module