Fix language detection

This commit is contained in:
Ines Montani 2020-09-29 21:08:13 +02:00
parent 78021089f9
commit 798040bc1d
1 changed files with 1 additions and 1 deletions

View File

@ -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(