rasa.nlu.extractors.mitie_entity_extractor
MitieEntityExtractor Objects
A Mitie Entity Extractor (which is a thin wrapper around Dlib-ml
).
required_components
Components that should be included in the pipeline before this component.
required_packages
Any extra python dependencies required for this component to run.
get_default_config
The component's default config (see parent class for full docstring).
__init__
Creates a new instance.
Arguments:
config
- The configuration.model_storage
- Storage which graph components can use to persist and load themselves.resource
- Resource locator for this component which can be used to persist and load itself from themodel_storage
.ner
- Mitie named entity extractor
validate_config
Checks whether the given configuration is valid.
Arguments:
config
- a configuration for a Mitie entity extractor component
create
Creates a new MitieEntityExtractor
.
Arguments:
config
- This config overrides thedefault_config
.model_storage
- Storage which graph components can use to persist and load themselves.resource
- Resource locator for this component which can be used to persist and load itself from themodel_storage
.execution_context
- Information about the current graph run. Unused.Returns
- An instantiatedMitieEntityExtractor
.
train
Trains a MITIE named entity recognizer.
Arguments:
training_data
- the training datamodel
- a MitieModel
Returns:
resource for loading the trained model
process
Extracts entities from messages and appends them to the attribute.
If no patterns where found during training, then the given messages will not
be modified. In particular, if no ENTITIES
attribute exists yet, then
it will not be created.
If no pattern can be found in the given message, then no entities will be
added to any existing list of entities. However, if no ENTITIES
attribute
exists yet, then an ENTITIES
attribute will be created.
Returns:
the given list of messages that have been modified
load
Loads trained component (see parent class for full docstring).
persist
Persist this model.