From de5062711b5b76d481bf9360a9cad99adf5f080b Mon Sep 17 00:00:00 2001 From: ines Date: Sun, 16 Apr 2017 22:26:24 +0200 Subject: [PATCH] Update adding languages workflow to reflect changes in __init__.py --- website/docs/usage/adding-languages.jade | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/docs/usage/adding-languages.jade b/website/docs/usage/adding-languages.jade index d1541bc87..0c98cc5ca 100644 --- a/website/docs/usage/adding-languages.jade +++ b/website/docs/usage/adding-languages.jade @@ -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]: