- spaCy Tutorial
- spaCy - Home
- spaCy - Introduction
- spaCy - Getting Started
- spaCy - Models and Languages
- spaCy - Architecture
- spaCy - Command Line Helpers
- spaCy - Top-level Functions
- spaCy - Visualization Function
- spaCy - Utility Functions
- spaCy - Compatibility Functions
- spaCy - Containers
- Doc Class ContextManager and Property
- spaCy - Container Token Class
- spaCy - Token Properties
- spaCy - Container Span Class
- spaCy - Span Class Properties
- spaCy - Container Lexeme Class
- Training Neural Network Model
- Updating Neural Network Model
- spaCy Useful Resources
- spaCy - Quick Guide
- spaCy - Useful Resources
- spaCy - Discussion
spaCy - Util.load_model_from_path
It is introduced in version 2.0. As the name suggests, this function will load a model from a data directory path.
It works by creating the language class and pipeline based on directory’s meta.json. Later on, it will call from_disk with the specified path. With this utility function, we can also easily test a new model that is yet to be packaged.
Arguments
The table below explains its arguments −
NAME | TYPE | DESCRIPTION |
---|---|---|
model_path | unicode | It is the path to the model the data directory. |
disable | List | It represents the names of pipeline components to disable. |
meta | Dict | It is model meta data. If this value is false, spaCy will try to load the meta from a meta.json in the same directory. |
Example
An example for util.load_model_from_path() function is given below −
import spacy nlp_model = spacy.util.load_model_from_path ("/path/to/data")
spacy_util_get_data_path.htm
Advertisements
To Continue Learning Please Login
Login with Google