spaCy - Command Line Helpers



This chapter gives information about the command line helpers used in spaCy.

Why Command Line Interface?

spaCy v1.7.0 and above comes with new command line helpers. It is used to download as well as link the models. You can also use it to show the useful debugging information. In short, command line helpers are used to download, train, package models, and also to debug spaCy.

Checking Available Commands

You can check the available commands by using spacy - -help command.

The example to check the available commands in spaCy is given below −

Example

C:\Users\Leekha>python -m spacy --help

Output

The output shows the available commands.

Available commands
download, link, info, train, pretrain, debug-data, evaluate, convert, package, init-model, profile, validate

Available Commands

The commands available in spaCy are given below along with their respective descriptions.

Sr.No. Command & Description
1 Download

To download models for spaCy.

2 Link

To create shortcut links for models.

3 Info

To print the information.

4 Validate

To check compatibility of the installed models.

5 Convert

To convert the files into spaCy's JSON format.

6 Pretrain

To pre-train the “token to vector (tok2vec)” layer of pipeline components.

7 Init-model

To create a new model directory from raw data.

8 Evaluate

To evaluate a model's accuracy and speed.

9 Package

To generate a model python package from an existing model data directory.

10 Debug-data

To analyse, debug, and validate our training and development data.

11 Train

To train a model.

Advertisements