rasa.nlu.utils.spacy_utils
SpacyModel Objects
Wraps SpacyNLP
output to make it fingerprintable.
fingerprint
Fingerprints the model name.
Use a static fingerprint as we assume this only changes if the model name changes and want to avoid investigating the model in greater detail for now.
Returns:
Fingerprint for model.
SpacyNLP Objects
Component which provides the common loaded SpaCy model to others.
This is used to avoid loading the SpaCy model multiple times. Instead the Spacy model is only loaded once and then shared by depending components.
__init__
Initializes a SpacyNLP
.
get_default_config
Default config.
load_model
Try loading the model, catching the OSError if missing.
required_packages
Lists required dependencies (see parent class for full docstring).
create
Creates component (see parent class for full docstring).
ensure_proper_language_model
Checks if the SpaCy language model is properly loaded.
Raises an exception if the model is invalid.
provide
Provides the loaded SpaCy model.
process_training_data
Adds SpaCy tokens and features to training data messages.
process
Adds SpaCy tokens and features to messages.