From 798040bc1d7073b44c349a4120bdf99a2a7dea99 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Tue, 29 Sep 2020 21:08:13 +0200 Subject: [PATCH] Fix language detection --- spacy/language.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/language.py b/spacy/language.py index ee73faed3..9591cb61d 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -1518,7 +1518,7 @@ class Language: ).merge(config) if "nlp" not in config: raise ValueError(Errors.E985.format(config=config)) - config_lang = config["nlp"]["lang"] + config_lang = config["nlp"].get("lang") if config_lang is not None and config_lang != cls.lang: raise ValueError( Errors.E958.format(