• Stars
    star
    1,516
  • Rank 29,853 (Top 0.7 %)
  • Language
    Python
  • Created about 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ’ซ Models for the spaCy Natural Language Processing (NLP) library

spaCy models

This repository contains releases of models for the spaCy NLP library. For more info on how to download, install and use the models, see the models documentation.

โš ๏ธ Important note: Because the models can be very large and consist mostly of binary data, we can't simply provide them as files in a GitHub repository. Instead, we've opted for adding them to releases as .whl and .tar.gz files. This allows us to still maintain a public release history.

Quickstart

To install a specific model, run the following command with the model name (for example en_core_web_sm):

python -m spacy download [model]

For the spaCy v1.x models, see here.

Model naming conventions

In general, spaCy expects all model packages to follow the naming convention of [lang]_[name]. For our provided pipelines, we divide the name into three components:

  • type: Model capabilities:
    • core: a general-purpose model with tagging, parsing, lemmatization and named entity recognition
    • dep: only tagging, parsing and lemmatization
    • ent: only named entity recognition
    • sent: only sentence segmentation
  • genre: Type of text the model is trained on (e.g. web for web text, news for news text)
  • size: Model size indicator:
    • sm: no word vectors
    • md: reduced word vector table with 20k unique vectors for ~500k words
    • lg: large word vector table with ~500k entries

For example, en_core_web_md is a medium-sized English model trained on written web text (blogs, news, comments), that includes a tagger, a dependency parser, a lemmatizer, a named entity recognizer and a word vector table with 20k unique vectors.

Model versioning

Additionally, the model versioning reflects both the compatibility with spaCy, as well as the model version. A model version a.b.c translates to:

  • a: spaCy major version. For example, 2 for spaCy v2.x.
  • b: spaCy minor version. For example, 3 for spaCy v2.3.x.
  • c: Model version. Different model config: e.g. from being trained on different data, with different parameters, for different numbers of iterations, with different vectors, etc.

For a detailed compatibility overview, see the compatibility.json. This is also the source of spaCy's internal compatibility check, performed when you run the download command.

Support for older versions

If you're using an older version (v1.6.0 or below), you can still download and install the old models from within spaCy using python -m spacy.en.download all or python -m spacy.de.download all. The .tar.gz archives are also attached to the v1.6.0 release. To download and install the models manually, unpack the archive, drop the contained directory into spacy/data and load the model via spacy.load('en') or spacy.load('de').

Downloading models

To increase transparency and make it easier to use spaCy with your own models, all data is now available as direct downloads, organised in individual releases. spaCy 1.7 also supports installing and loading models as Python packages. You can now choose how and where you want to keep the data files, and set up "shortcut links" to load models by name from within spaCy. For more info on this, see the new models documentation.

# download best-matching version of specific model for your spaCy installation
python -m spacy download en_core_web_sm

# pip install .whl or .tar.gz archive from path or URL
pip install /Users/you/en_core_web_sm-3.0.0.tar.gz
pip install /Users/you/en_core_web_sm-3.0.0-py3-none-any.whl
pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz
pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0-py3-none-any.whl

Loading and using models

To load a model, use spacy.load() with the model name, a shortcut link or a path to the model data directory.

import spacy
nlp = spacy.load("en_core_web_sm")
doc = nlp(u"This is a sentence.")

You can also import a model directly via its full name and then call its load() method with no arguments. This should also work for older models in previous versions of spaCy.

import spacy
import en_core_web_sm

nlp = en_core_web_sm.load()
doc = nlp(u"This is a sentence.")

Manual download and installation

In some cases, you might prefer downloading the data manually, for example to place it into a custom directory. You can download the model via your browser from the latest releases, or configure your own download script using the URL of the archive file. The archive consists of a model directory that contains another directory with the model data.

โ””โ”€โ”€ en_core_web_md-3.0.0.tar.gz       # downloaded archive
    โ”œโ”€โ”€ setup.py                      # setup file for pip installation
    โ”œโ”€โ”€ meta.json                     # copy of pipeline meta
    โ””โ”€โ”€ en_core_web_md                # ๐Ÿ“ฆ pipeline package
        โ”œโ”€โ”€ __init__.py               # init for pip installation
        โ””โ”€โ”€ en_core_web_md-3.0.0      # pipeline data
            โ”œโ”€โ”€ config.cfg            # pipeline config
            โ”œโ”€โ”€ meta.json             # pipeline meta
            โ””โ”€โ”€ ...                   # directories with component data

๐Ÿ“– For more info and examples, check out the models documentation.

spaCy v1.x Releases

Date Model Version Dep Ent Vec Size License
2017-06-06 es_core_web_md 1.0.0 X X X 377 MB CC BY-SA
2017-04-26 fr_depvec_web_lg 1.0.0 X X 1.33 GB CC BY-NC
2017-03-21 en_core_web_md 1.2.1 X X X 1 GB CC BY-SA
2017-03-21 en_depent_web_md 1.2.1 X X 328 MB CC BY-SA
2017-03-17 en_core_web_sm 1.2.0 X X X 50 MB CC BY-SA
2017-03-17 en_core_web_md 1.2.0 X X X 1 GB CC BY-SA
2017-03-17 en_depent_web_md 1.2.0 X X 328 MB CC BY-SA
2016-05-10 de_core_news_md 1.0.0 X X X 645 MB CC BY-SA
2016-03-08 en_vectors_glove_md 1.0.0 X 727 MB CC BY-SA

Model naming conventions for v1.x models

  • type: Model capabilities (e.g. core for general-purpose model with vocabulary, syntax, entities and word vectors, or depent for only vocab, syntax and entities)
  • genre: Type of text the model is trained on (e.g. web for web text, news for news text)
  • size: Model size indicator (sm, md or lg)

For example, en_depent_web_md is a medium-sized English model trained on written web text (blogs, news, comments), that includes vocabulary, syntax and entities.

Issues and bug reports

To report an issue with a model, please open an issue on the spaCy issue tracker. Please note that no model is perfect. Because models are statistical, their expected behaviour will always include some errors. However, particular errors can indicate deeper issues with the training feature extraction or optimisation code. If you come across patterns in the model's performance that seem suspicious, please do file a report.

More Repositories

1

spaCy

๐Ÿ’ซ Industrial-strength Natural Language Processing (NLP) in Python
Python
28,700
star
2

thinc

๐Ÿ”ฎ A refreshing functional take on deep learning, compatible with your favorite libraries
Python
2,777
star
3

spacy-course

๐Ÿ‘ฉโ€๐Ÿซ Advanced NLP with spaCy: A free online course
Python
2,268
star
4

sense2vec

๐Ÿฆ† Contextually-keyed word vectors
Python
1,595
star
5

spacy-transformers

๐Ÿ›ธ Use pretrained transformers like BERT, XLNet and GPT-2 in spaCy
Python
1,320
star
6

projects

๐Ÿช End-to-end NLP workflows from prototype to production
Python
1,249
star
7

spacy-llm

๐Ÿฆ™ Integrating LLMs into structured NLP pipelines
Python
950
star
8

curated-transformers

๐Ÿค– A PyTorch library of curated Transformer models and their composable components
Python
837
star
9

spacy-streamlit

๐Ÿ‘‘ spaCy building blocks and visualizers for Streamlit apps
Python
765
star
10

spacy-stanza

๐Ÿ’ฅ Use the latest Stanza (StanfordNLP) research models directly in spaCy
Python
715
star
11

prodigy-recipes

๐Ÿณ Recipes for the Prodigy, our fully scriptable annotation tool
Jupyter Notebook
464
star
12

wasabi

๐Ÿฃ A lightweight console printing and formatting toolkit
Python
438
star
13

cymem

๐Ÿ’ฅ Cython memory pool for RAII-style memory management
Cython
434
star
14

srsly

๐Ÿฆ‰ Modern high-performance serialization utilities for Python (JSON, MessagePack, Pickle)
Python
414
star
15

displacy

๐Ÿ’ฅ displaCy.js: An open-source NLP visualiser for the modern web
JavaScript
344
star
16

lightnet

๐ŸŒ“ Bringing pjreddie's DarkNet out of the shadows #yolo
C
319
star
17

prodigy-openai-recipes

โœจ Bootstrap annotation with zero- & few-shot learning via OpenAI GPT-3
Python
315
star
18

spacy-notebooks

๐Ÿ’ซ Jupyter notebooks for spaCy examples and tutorials
Jupyter Notebook
284
star
19

spacy-services

๐Ÿ’ซ REST microservices for various spaCy-related tasks
Python
239
star
20

cython-blis

๐Ÿ’ฅ Fast matrix-multiplication as a self-contained Python library โ€“ no system dependencies!
C
209
star
21

displacy-ent

๐Ÿ’ฅ displaCy-ent.js: An open-source named entity visualiser for the modern web
CSS
196
star
22

jupyterlab-prodigy

๐Ÿงฌ A JupyterLab extension for annotating data with Prodigy
TypeScript
187
star
23

tokenizations

Robust and Fast tokenizations alignment library for Rust and Python https://tamuhey.github.io/tokenizations/
Rust
179
star
24

spacymoji

๐Ÿ’™ Emoji handling and meta data for spaCy with custom extension attributes
Python
177
star
25

wheelwright

๐ŸŽก Automated build repo for Python wheels and source packages
Python
173
star
26

catalogue

Super lightweight function registries for your library
Python
170
star
27

confection

๐Ÿฌ Confection: the sweetest config system for Python
Python
165
star
28

spacy-dev-resources

๐Ÿ’ซ Scripts, tools and resources for developing spaCy
Python
125
star
29

radicli

๐Ÿ•Š๏ธ Radically lightweight command-line interfaces
Python
96
star
30

spacy-experimental

๐Ÿงช Cutting-edge experimental spaCy components and features
Python
93
star
31

spacy-lookups-data

๐Ÿ“‚ Additional lookup tables and data resources for spaCy
Python
93
star
32

talks

๐Ÿ’ฅ Browser-based slides or PDFs of our talks and presentations
JavaScript
90
star
33

thinc-apple-ops

๐Ÿ Make Thinc faster on macOS by calling into Apple's native Accelerate library
Cython
89
star
34

healthsea

Healthsea is a spaCy pipeline for analyzing user reviews of supplementary products for their effects on health.
Python
84
star
35

preshed

๐Ÿ’ฅ Cython hash tables that assume keys are pre-hashed
Cython
78
star
36

spacy-huggingface-pipelines

๐Ÿ’ฅ Use Hugging Face text and token classification pipelines directly in spaCy
Python
57
star
37

spacy-ray

โ˜„๏ธ Parallel and distributed training with spaCy and Ray
Python
53
star
38

ml-datasets

๐ŸŒŠ Machine learning dataset loaders for testing and example scripts
Python
45
star
39

assets

๐Ÿ’ฅ Explosion Assets
43
star
40

murmurhash

๐Ÿ’ฅ Cython bindings for MurmurHash2
C++
42
star
41

weasel

๐Ÿฆฆ weasel: A small and easy workflow system
Python
41
star
42

spacy-huggingface-hub

๐Ÿค— Push your spaCy pipelines to the Hugging Face Hub
Python
39
star
43

vscode-prodigy

๐Ÿงฌ A VS Code extension for annotating data with Prodigy
TypeScript
29
star
44

wikid

Generate a SQLite database from Wikipedia & Wikidata dumps.
Python
26
star
45

spacy-alignments

๐Ÿ’ซ A spaCy package for Yohei Tamura's Rust tokenizations library
Python
26
star
46

spacy-vscode

spaCy extension for Visual Studio Code
Python
23
star
47

spacy-benchmarks

๐Ÿ’ซ Runtime performance comparison of spaCy against other NLP libraries
Python
20
star
48

spacy-curated-transformers

spaCy entry points for Curated Transformers
Python
19
star
49

prodigy-hf

Train huggingface models on top of Prodigy annotations
Python
17
star
50

spacy-vectors-builder

๐ŸŒธ Train floret vectors
Python
15
star
51

os-signpost

Wrapper for the macOS signpost API
Cython
11
star
52

prodigy-pdf

A Prodigy plugin for PDF annotation
Python
11
star
53

spacy-loggers

๐Ÿ“Ÿ Logging utilities for spaCy
Python
11
star
54

prodigy-evaluate

๐Ÿ”Ž A Prodigy plugin for evaluating spaCy pipelines
Python
11
star
55

prodigy-segment

Select pixels in Prodigy via Facebook's Segment-Anything model.
Python
10
star
56

curated-tokenizers

Lightweight piece tokenization library
Cython
10
star
57

conll-2012

A slightly cleaned up version of the scripts & data for the CoNLL 2012 Coreference task.
Python
10
star
58

thinc_gpu_ops

๐Ÿ”ฎ GPU kernels for Thinc
C++
9
star
59

princetondh

Code for our presentation in Princeton DH 2023 April.
Jupyter Notebook
4
star
60

spacy-legacy

๐Ÿ•ธ๏ธ Legacy architectures and other registered spaCy v3.x functions for backwards-compatibility
Python
4
star
61

prodigy-ann

A Prodigy pluging for ANN techniques
Python
3
star
62

prodigy-whisper

Audio transcription with OpenAI's whisper model in the loop.
Python
3
star
63

ec2buildwheel

Python
2
star
64

aiGrunn-2023

Materials for the aiGrunn 2023 talk on spaCy Transformer pipelines
Python
1
star
65

spacy-io-binder

๐Ÿ“’ Repository used to build Binder images for the interactive spaCy code examples
Jupyter Notebook
1
star
66

prodigy-lunr

A Prodigy plugin for document search via LUNR
Python
1
star
67

.github

:octocat: GitHub settings
1
star
68

span-labeling-datasets

Loaders for various span labeling datasets
Python
1
star