Skip to content
Discussion options

You must be logged in to vote

Be aware that spacy.read_labels.v1 fails silently unless you add require = true, so it could be something as simple as an incorrect path.

Or you can skip this and just provide your training corpus with spacy train, though, and that will also initialize the labels from train.spacy.

If you want to use nlp.initialize, then it looks like this:

from spacy.training import Corpus
nlp = spacy.blank("en")
examples = list(Corpus("/path/to/train.spacy")(nlp))
nlp.initialize(lambda: examples)

It is on our to-do list to improve all the Component.initialize docs because they don't really show how to do it properly.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@adrianeboyd
Comment options

@spatiebalk
Comment options

@jd12006
Comment options

@Norky101
Comment options

@rmitsch
Comment options

Answer selected by spatiebalk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
training Training and updating models feat / pipeline Feature: Processing pipeline and components
5 participants