Machine Learning & AI

spacy

Natural language processing built for shipping products, not for grading linguistics homework.

Install it: pip install spacy

What does it do?

spaCy reads text and breaks it down the way a very fast, very literal grammar teacher would, identifying which words are nouns or verbs, which refer to real people, places, or companies, and how phrases relate grammatically. It does this at high speed on large volumes of text, exactly what businesses need when processing thousands of documents or support tickets. Unlike more academic NLP tools, it was built from day one to run reliably inside real products, not just research notebooks. Feed it a paragraph and it can tell you, almost instantly, which words are company names, dates, or locations.

See it in action

This code reads a sentence and automatically picks out the names of companies and places mentioned in it.

import spacy

nlp = spacy.load("en_core_web_sm")
doc = nlp("Apple is looking at buying a startup in San Francisco.")

for ent in doc.ents:
    print(ent.text, ent.label_)

Why would a non-developer care?

Any time software automatically pulls a company name, date, or address out of a block of text, like an email client detecting an event to add to your calendar, something like spaCy is likely doing that extraction work behind the scenes. It matters because turning messy human writing into structured data automatically is a genuinely hard problem that used to require manual review.

Real-world examples

It’s widely used in industries that process huge volumes of text automatically, including legal tech companies scanning contracts and news organizations tagging articles. It was built by Explosion, a company founded specifically to make production-grade NLP tools, as a deliberate alternative to slower, more academic options.

Who uses it

Software engineers building products that need to extract structured information, names, dates, companies, from text at scale and speed.

How it compares to alternatives

Its main alternative is NLTK, an older, more academic toolkit better for teaching and experimentation but slower in production. Increasingly, both compete indirectly with simply asking a large language model like GPT or Claude to extract the same information via a prompt, more flexible but slower and costlier per document.

Fun fact

spaCy’s name plays on space and speed, reflecting its founders’ focus on being fast enough for production use, a contrast they drew explicitly against NLTK when they released it in 2015.

New to Python and want to actually try libraries like this yourself?

Find a beginner-friendly course

Related libraries