← all repositories
allenai/scispacy

When your NLP pipeline needs a crash course in biology

scispaCy retunes spaCy’s entire pipeline for scientific literature so you don’t have to retrain a generic model to recognize biomedical entities.

2k stars Python Domain AppsData Tooling
scispacy
Not currently ranked — collecting fresh signals.
star history

What it does

scispaCy layers custom spaCy components onto the standard pipeline so it can handle scientific text without tripping over biomedical terminology. It ships custom tokenization rules, a POS tagger and syntactic parser trained on biomedical data, and several NER models tuned on corpora like CRAFT and BC5CDR. You load it like any other spaCy model, but it recognizes entities and structures generic pipelines usually miss.

The interesting bit

The real utility is in the add-on pipes: an AbbreviationDetector that resolves parenthetical shortcuts to their long forms using the classic Schwartz & Hearst algorithm, and an EntityLinker that maps mentions to knowledge bases such as UMLS, MeSH, and RxNorm using fast character 3-gram overlap and approximate nearest neighbors. It is a pragmatic, string-matching approach to linking rather than a heavyweight neural reranker, which makes the initial KB download large (~1 GB) but keeps runtime predictable.

Key highlights

  • Pre-trained NER models for four biomedical corpora: CRAFT, JNLPBA, BC5CDR, and BIONLP13CG.
  • AbbreviationDetector pipe exposes abbreviations and their long forms via custom doc._.abbreviations attributes.
  • EntityLinker supports five knowledge bases, including UMLS (~3M concepts) and MeSH (~30k entities).
  • Model sizes range from a small ~100k-vocabulary pipeline up to a SciBERT-based transformer variant.
  • Custom tokenizer rules sit on top of spaCy’s rule-based tokenizer to better split scientific language.

Caveats

  • The public demo runs an older version, so output may not match the current release.
  • Entity linking relies on character 3-gram overlap and approximate nearest neighbors; the README explicitly notes this is “currently just char-3gram matching,” so expect approximate rather than deeply contextual matches.
  • Library and model versions are tightly coupled, meaning an upgrade requires re-downloading compatible models.

Verdict

Bioinformatics and medical NLP teams already working in the spaCy ecosystem should grab this to avoid rebuilding the same biomedical baselines. Everyone else—especially anyone outside life sciences—can safely skip it.

Frequently asked

What is allenai/scispacy?
scispaCy retunes spaCy’s entire pipeline for scientific literature so you don’t have to retrain a generic model to recognize biomedical entities.
Is scispacy open source?
Yes — allenai/scispacy is open source, released under the Apache-2.0 license.
What language is scispacy written in?
allenai/scispacy is primarily written in Python.
How popular is scispacy?
allenai/scispacy has 2k stars on GitHub.
Where can I find scispacy?
allenai/scispacy is on GitHub at https://github.com/allenai/scispacy.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.