Add documentation for new convert and model commands

This commit is contained in:
ines 2017-04-07 13:27:55 +02:00
parent 255650dbc2
commit 2f38c1d77f

View File

@ -104,35 +104,77 @@ p
+cell flag
+cell Show help message and available arguments.
+h(2, "package") Package
+h(2, "convert") Convert
+tag experimental
p
| Generate a #[+a("/docs/usage/models#own-models") model Python package]
| from an existing model data directory. All data files are copied over,
| and the meta data can be entered directly from the command line. While
| this feature is still experimental, the required file templates are
| downloaded from #[+src(gh("spacy-dev-resources", "templates/model")) GitHub].
| This means you need to be connected to the internet to use this command.
| Convert files into spaCy's #[+a("/docs/api/annotation#json-input") JSON format]
| for use with the #[code train] command and other experiment management
| functions. The right converter is chosen based on the file extension of
| the input file. Currently only supports #[code .conllu].
+code(false, "bash").
python -m spacy package [input_dir] [output_dir] [--force]
python -m spacy convert [input_file] [output_dir] [--n_sents] [--morphology]
+table(["Argument", "Type", "Description"])
+row
+cell #[code input_dir]
+cell #[code input_file]
+cell positional
+cell Path to directory containing model data.
+cell Input file.
+row
+cell #[code output_dir]
+cell positional
+cell Directory to create package folder in.
+cell Output directory for converted JSON file.
+row
+cell #[code --force], #[code -f]
+cell #[code --n_sents], #[code -n]
+cell option
+cell Number of sentences per document.
+row
+cell #[code --morphology], #[code -m]
+cell option
+cell Enable appending morphology to tags.
+row
+cell #[code --help], #[code -h]
+cell flag
+cell Force overwriting of existing folder in output directory.
+cell Show help message and available arguments.
+h(2, "model") Model
+tag experimental
p Initialise a new model and its data directory.
+code(false, "bash").
python -m spacy model [lang] [model_dir] [freqs_data] [clusters_data] [vectors_data]
+table(["Argument", "Type", "Description"])
+row
+cell #[code lang]
+cell positional
+cell Model language.
+row
+cell #[code model_dir]
+cell positional
+cell Output directory to store the model in.
+row
+cell #[code freqs_data]
+cell positional
+cell Tab-separated frequencies file.
+row
+cell #[code clusters_data]
+cell positional
+cell Brown custers file (optional).
+row
+cell #[code vectors_data]
+cell positional
+cell Word vectors file (optional).
+row
+cell #[code --help], #[code -h]
@ -199,3 +241,38 @@ p
+cell #[code --help], #[code -h]
+cell flag
+cell Show help message and available arguments.
+h(2, "package") Package
+tag experimental
p
| Generate a #[+a("/docs/usage/models#own-models") model Python package]
| from an existing model data directory. All data files are copied over,
| and the meta data can be entered directly from the command line. While
| this feature is still experimental, the required file templates are
| downloaded from #[+src(gh("spacy-dev-resources", "templates/model")) GitHub].
| This means you need to be connected to the internet to use this command.
+code(false, "bash").
python -m spacy package [input_dir] [output_dir] [--force]
+table(["Argument", "Type", "Description"])
+row
+cell #[code input_dir]
+cell positional
+cell Path to directory containing model data.
+row
+cell #[code output_dir]
+cell positional
+cell Directory to create package folder in.
+row
+cell #[code --force], #[code -f]
+cell flag
+cell Force overwriting of existing folder in output directory.
+row
+cell #[code --help], #[code -h]
+cell flag
+cell Show help message and available arguments.