spaCy Lookups Data

raw JSON →
1.0.5 verified Fri May 01 auth: no python maintenance

Additional lookup tables, lemmatization data, and other language resources for spaCy. Version 1.0.5 is the latest stable release. The package provides supplementary data that spaCy loads on demand; it is updated infrequently but follows spaCy's major releases.

pip install spacy-lookups-data
error ModuleNotFoundError: No module named 'spacy_lookups_data'
cause Trying to import the package directly. spacy-lookups-data is a data package and should not be imported.
fix
Remove the import statement. Just install the package and let spaCy use it automatically.
error ValueError: [E955] Can't find table(s) 'lemma_rules' for language 'en'.
cause spacy-lookups-data is not installed or the version is incompatible with the spaCy model.
fix
Run 'pip install spacy-lookups-data' and ensure your spaCy version is 3.x.
breaking spaCy v3+ changed the way lookup tables are loaded. spacy-lookups-data 1.0.x is compatible with spaCy v3 only. Older versions (0.x) are for spaCy v2. Do not mix versions.
fix Ensure spaCy version is >=3.0 and <4.0 when using spacy-lookups-data 1.x.
gotcha The package does not need to be imported in your code. Installing it is sufficient — spaCy will discover it automatically. Trying to import it directly (import spacy_lookups_data) will raise ModuleNotFoundError.
fix Do not import spacy_lookups_data; just pip install it.
deprecated spacy-lookups-data is in maintenance mode. Future spaCy versions may reduce reliance on external lookup packages. Consider using spaCy's built-in data or bundled models instead.
fix Check spaCy release notes for alternative data sources.

Verify that lookups data is available in a spaCy model. The package itself is not imported directly; its data is used transparently by spaCy.

import spacy
from spacy.lookups import Lookups

# Load a small model that uses lookups
nlp = spacy.load('en_core_web_sm')

# Access lookups table (if available for the model)
# The package provides data automatically; no explicit import needed.
# Check if a table is present:
lookups = nlp.vocab.lookups
print(lookups.get_table('lemma_rules')[:2])  # example, may be empty