spaCy
What is spaCy?
spaCy is a free, open-source Python library for natural language processing (NLP) that handles tasks like tokenization, part-of-speech tagging, dependency parsing, and named entity recognition on large volumes of text at production speed. Matthew Honnibal and Ines Montani launched the project in 2015 through Explosion.
Why spaCy matters
spaCy is built for production use rather than research experimentation. Its pipelines run in carefully memory-managed Cython, which is why teams processing large document sets (contracts, clinical notes, support tickets) reach for it over research-oriented alternatives. The current 3.8 series ships transformer-based pipelines for higher accuracy, a config-driven training system for reproducible runs, and a Quickstart widget for generating training configurations.
spaCy also integrates with large language models through the spacy-llm package, which lets teams prompt an LLM for tasks like classification or entity extraction inside a spaCy pipeline without collecting training data first. In practice, this also makes spaCy a common preprocessing step ahead of retrieval-augmented generation (RAG): its tokenization and entity extraction are often used to chunk documents and tag entities before they're embedded and indexed, which produces cleaner retrieval results than chunking on raw text alone.
The spaCy Universe extends the core library into specialized domains. Blackstone parses unstructured UK legal text; Kindred extracts entities from biomedical literature; Prodigy supports human-in-the-loop annotation for labeling training data.
How do you install spaCy?
pip install spacyThen download a trained pipeline for the language you need. For English:
python -m spacy download en_core_web_smFAQ
Is spaCy free to use commercially?
Yes. spaCy is MIT-licensed and free for commercial use. Explosion, the company behind spaCy, sells commercial support and a separate annotation tool (Prodigy) rather than licensing spaCy itself.
How is spaCy different from NLTK?
NLTK is oriented toward teaching and research, with more algorithm choices exposed for experimentation. spaCy is opinionated toward production: it ships one well-optimized path per task rather than several interchangeable ones, which is faster to deploy but less flexible for comparing algorithms. Reach for spaCy when you need to process text at production speed and reach for NLTK when you're comparing algorithms or teaching the underlying concepts. For a fuller comparison, see how spaCy stacks up against NLTK and Spark NLP.
Does spaCy work with large language models?
Yes, through the spacy-llm package. It's opt-in rather than part of the core library, so a standard spaCy pipeline has no LLM dependency unless you add it.