mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
Update adding languages workflow to reflect changes in __init__.py
This commit is contained in:
parent
4efd6fb9d6
commit
de5062711b
|
@ -63,14 +63,16 @@ p
|
||||||
tag_map = TAG_MAP
|
tag_map = TAG_MAP
|
||||||
stop_words = STOP_WORDS
|
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").
|
+code("spacy/__init__.py").
|
||||||
from . import en
|
from . import en
|
||||||
from . import xx
|
from . import xx
|
||||||
|
|
||||||
set_lang_class(en.English.lang, en.English)
|
_languages = (en.English, ..., xx.Xxxxx)
|
||||||
set_lang_class(xx.Xxxxx.lang, xx.Xxxxx)
|
|
||||||
|
|
||||||
p You'll also need to list the new package in #[+src(gh("spaCy", "spacy/setup.py")) setup.py]:
|
p You'll also need to list the new package in #[+src(gh("spaCy", "spacy/setup.py")) setup.py]:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user