Stanford NLP · accurate multilingual linguistic analysis on PyTorch · verified against Stanza 1.x (2026)

Stanza cheat sheet

Stanza is Stanford NLP's Python toolkit: a neural Pipeline that runs tokenization, sentence splitting, POS/morphology, lemmatization, dependency parsing, and NER across 70+ languages — trained on Universal Dependencies, prioritizing linguistic accuracy. The flow is always download → Pipeline → nlp(text) → a Document of sentences & words. It also wraps Java CoreNLP. This sheet targets Stanza 1.x (Python 3.9+).

pipeline & document tokens, POS, lemma dependency parse NER & classification options & interop gotcha most common

Verified 2026-08-24 against the official docs at stanfordnlp.github.io/stanza and the stanfordnlp/stanza repo (1.x). Models download from the Stanza/HF hub; built on PyTorch. Compare with spaCy (faster, production) & Flair (embeddings).

Outline

Download a language's models once, build a Pipeline with the processors you need, then read the resulting Document.

Setup

  1. 1 · Install & Pipeline
  2. 2 · The Document

Analyze

  1. 3 · Tokens, POS, lemma
  2. 4 · Dependency parse

Extract

  1. 5 · Named entities
  2. 6 · Sentiment & more

Operate

  1. 7 · Pipeline options
  2. 8 · Output & CoreNLP
  3. 9 · Gotchas
  4. Worth memorizing

Setup

Download models, build the pipeline.

1Install & Pipeline1.x
2The Documentnested structure

Analyze

Per-word annotations and syntax.

3Tokens, POS, lemmaword attributes
4Dependency parsesyntactic structure

Extract

Entities and document-level labels.

5Named entitiesNER
6Sentiment & moreextra processors

Operate

Tune the pipeline and export.

7Pipeline optionsspeed & input
8Output & CoreNLPexport & Java
!Common gotchasread before shipping

Worth memorizing

download → Pipeline → nlp(text)Document → sentences → words
processors= to pick taskstokenize,pos,lemma,depparse,ner (+ dependencies)
word.upos / lemma / featsuniversal POS, base form, morphology
word.head / word.deprel1-based head id (0=root) + relation
doc.entitiesspans with .text and .type
70+ languages, same APIPipeline("zh"/"de"/"ar"...)
build the pipeline oncemodel loading is the slow part; reuse nlp
CoNLL / to_dict to exportCoreNLPClient for Java-only annotators (coref)
accuracy-first, not fastestspaCy for production throughput