Skip to content

How do you apply a SpaCy project in practice? #11699

Discussion options

You must be logged in to vote

Hi @metalaureate , the tar output from the package command creates an installable Python package. You need to install it first before loading:

pip install path/to/en_ner_tweets-1.0.0.tar.gz

Then you can load it into Python by passing the appropriate name in spacy.load. To sanity-check if your environment has installed the pipeline, you can run python -m spacy info. You can see more from the docs.

Since you ran the whole training process for ner_tweets, you can also load the model directly. Something like this:

import spacy
nlp = spacy.load("path/to/training/model-best")

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@metalaureate
Comment options

Answer selected by metalaureate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / serialize Feature: Serialization, saving and loading
2 participants