mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
Update adding languages docs with new commands
This commit is contained in:
parent
41037f0f07
commit
cf558e37c3
|
@ -398,11 +398,12 @@ p
|
||||||
| vectors files, you can use the
|
| vectors files, you can use the
|
||||||
| #[+src(gh("spacy-dev-resources", "training/init.py")) init.py]
|
| #[+src(gh("spacy-dev-resources", "training/init.py")) init.py]
|
||||||
| script from our
|
| script from our
|
||||||
| #[+a(gh("spacy-dev-resources")) developer resources] to create a
|
| #[+a(gh("spacy-dev-resources")) developer resources], or use the new
|
||||||
| spaCy data directory:
|
| #[+a("/docs/usage/cli#model") #[code model] command] to create a data
|
||||||
|
| directory:
|
||||||
|
|
||||||
+code(false, "bash").
|
+code(false, "bash").
|
||||||
python training/init.py xx your_data_directory/ my_data/word_freqs.txt my_data/clusters.txt my_data/word_vectors.bz2
|
python -m spacy model [lang] [model_dir] [freqs_data] [clusters_data] [vectors_data]
|
||||||
|
|
||||||
+aside-code("your_data_directory", "yaml").
|
+aside-code("your_data_directory", "yaml").
|
||||||
├── vocab/
|
├── vocab/
|
||||||
|
@ -421,17 +422,14 @@ p
|
||||||
|
|
||||||
p
|
p
|
||||||
| This creates a spaCy data directory with a vocabulary model, ready to be
|
| This creates a spaCy data directory with a vocabulary model, ready to be
|
||||||
| loaded. By default, the
|
| loaded. By default, the command expects to be able to find your language
|
||||||
| #[+src(gh("spacy-dev-resources", "training/init.py")) init.py]
|
| class using #[code spacy.util.get_lang_class(lang_id)].
|
||||||
| script expects to be able to find your language class using
|
|
||||||
| #[code spacy.util.get_lang_class(lang_id)]. You can edit the script to
|
|
||||||
| help it find your language class if necessary.
|
|
||||||
|
|
||||||
+h(3, "word-frequencies") Word frequencies
|
+h(3, "word-frequencies") Word frequencies
|
||||||
|
|
||||||
p
|
p
|
||||||
| The #[+src(gh("spacy-dev-resources", "training/init.py")) init.py]
|
| The #[+a("/docs/usage/cli#model") #[code model] command] expects a
|
||||||
| script expects a tab-separated word frequencies file with three columns:
|
| tab-separated word frequencies file with three columns:
|
||||||
|
|
||||||
+list("numbers")
|
+list("numbers")
|
||||||
+item The number of times the word occurred in your language sample.
|
+item The number of times the word occurred in your language sample.
|
||||||
|
|
|
@ -145,7 +145,9 @@ p
|
||||||
+h(2, "model") Model
|
+h(2, "model") Model
|
||||||
+tag experimental
|
+tag experimental
|
||||||
|
|
||||||
p Initialise a new model and its data directory.
|
p
|
||||||
|
| Initialise a new model and its data directory. For more info on this, see
|
||||||
|
| the documentation on #[+a("/docs/usage/adding-languages") adding languages].
|
||||||
|
|
||||||
+code(false, "bash").
|
+code(false, "bash").
|
||||||
python -m spacy model [lang] [model_dir] [freqs_data] [clusters_data] [vectors_data]
|
python -m spacy model [lang] [model_dir] [freqs_data] [clusters_data] [vectors_data]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user