Skip to content
Discussion options

You must be logged in to vote

After checking @ljvmiranda921 answer, as well as spaCy code, I have implemented the following solution:

from pathlib import Path
from spacy.cli.download import download
from spacy.cli.init_config import fill_config
from spacy.cli.train import train

download('en_core_web_lg')
fill_config(Path("config.cfg"), Path("base_config.cfg"))
train(Path("config.cfg"), Path("my_model"), overrides={"paths.train": "train.spacy", "paths.dev": "dev.spacy"})

With it, I have managed to successfully train a spaCy NER model, from a Python script (i.e., via python train.py).

Thanks for your help.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@dave-espinosa
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by dave-espinosa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
training Training and updating models
2 participants