Update adding languages workflow to reflect changes in __init__.py
@@ -63,14 +63,16 @@ p
tag_map = TAG_MAP
stop_words = STOP_WORDS
-p Additionally, the new #[code Language] class needs to be registered in #[+src(gh("spaCy", "spacy/__init__.py")) spacy/__init__.py] using the #[code set_lang_class()] function, so that you can use #[code spacy.load()].
+p
+ | Additionally, the new #[code Language] class needs to be added to the
+ | list of available languages in #[+src(gh("spaCy", "spacy/__init__.py")) __init__.py].
+ | The languages are then registered using the #[code set_lang_class()] function.
+code("spacy/__init__.py").
from . import en
from . import xx
- set_lang_class(en.English.lang, en.English)
- set_lang_class(xx.Xxxxx.lang, xx.Xxxxx)
+ _languages = (en.English, ..., xx.Xxxxx)
p You'll also need to list the new package in #[+src(gh("spaCy", "spacy/setup.py")) setup.py]:
