notice
This is documentation for Rasa Documentation v2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (3.x).
rasa.nlu.utils.spacy_utils
SpacyNLP Objects
The core component that links spaCy to related components in the pipeline.
load_model
Try loading the model, catching the OSError if missing.
provide_context
Creates a context dictionary from spaCy nlp object.
doc_for_text
Makes a spaCy doc object from a string of text.
preprocess_text
Processes the text before it is handled by spaCy.
merge_content_lists
Merge lists with processed Docs back into their original order.
filter_training_samples_by_content
Separates empty training samples from content bearing ones.
process_content_bearing_samples
Sends content bearing training samples to spaCy's pipe.
process_non_content_bearing_samples
Creates empty Doc-objects from zero-lengthed training samples strings.
load
Loads trained 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.