Update adding languages docs with new commands

This commit is contained in:
ines 2017-04-13 13:52:09 +02:00
parent 41037f0f07
commit cf558e37c3
2 changed files with 11 additions and 11 deletions

View File

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

View File

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