- spaCy Tutorial
- spaCy - Home
- spaCy - Introduction
- spaCy - Getting Started
- spaCy - Models and Languages
- spaCy - Architecture
- spaCy - Command Line Helpers
- spaCy - Top-level Functions
- spaCy - Visualization Function
- spaCy - Utility Functions
- spaCy - Compatibility Functions
- spaCy - Containers
- Doc Class ContextManager and Property
- spaCy - Container Token Class
- spaCy - Token Properties
- spaCy - Container Span Class
- spaCy - Span Class Properties
- spaCy - Container Lexeme Class
- Training Neural Network Model
- Updating Neural Network Model
- spaCy Useful Resources
- spaCy - Quick Guide
- spaCy - Useful Resources
- spaCy - Discussion
spaCy - Evaluate Command
As name implies, this command will evaluate a model accuracy and speed. It will be done on JSON’-formatted annotated data. Evaluate command will print the results and optionally export displaCy visualisations of a sample set of parsers to HTML files (.html).
On the other hand, if the respective component is present in the model’s pipeline, the visualizations for dependency parse and NER will be exported as separate files.
The Evaluate command is as follows −
python -m spacy evaluate [model] [data_path] [--displacy-path] [--displacy-limit][--gpu-id] [--gold-preproc] [--return-scores]
Arguments
The table below explains its arguments −
ARGUMENT | TYPE | DESCRIPTION |
---|---|---|
model | positional | This argument represents the model to be evaluated. It can be either a package or shortcut link name, or a path to a model data directory. |
data_path | positional | It is the location of JSON-formatted evaluation data. |
--displacy-path, -dp | option | This argument is the directory to output rendered parses as HTML. If this argument is not set, then no visualisations will be generated. |
--displacy-limit, -dl | option | It represents the number of parses to generate per file. The default value is 25. |
--gpu-id, -g | option | If you want to use GPU, you need to define here. The default value of -1 is for CPU. |
--gold-preproc, -G | flag | This argument is for the use of gold preprocessing. |
--return-scores, -R | flag | It will return dict containing model scores. |
spacy_command_line_helpers.htm
Advertisements