Skip to content
Discussion options

You must be logged in to vote

The to_disk() methods save all the model data that can be serialized safely but don't save the entire object. In particular, they don't save any of the methods that are part of the language configuration in spacy/lang/lg. To load the object back in an identical state, you need the language-specific initialization with the language settings from the library plus the data from the saved model. See https://spacy.io/usage/saving-loading#pipeline and https://spacy.io/usage/processing-pipelines#pipelines .

The crucial part is this:

vocab = Vocab()

When you initialize a Vocab without any of its arguments, it's missing many of its normal language-specific settings including the lexical attribute…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / matcher Feature: Token, phrase and dependency matcher
2 participants