stanza
Stanford NLP Python library for tokenization, sentence segmentation, NER, and parsing of many human languages
What is stanza?
Stanford NLP Python library for tokenization, sentence segmentation, NER, and parsing of many human languages
Overview of stanza
What it is
Stanza is a Python natural language processing library developed by the Stanford NLP Group. It provides tools for tokenization, sentence segmentation, named entity recognition (NER), and dependency parsing for over 60 languages. The library also includes an official wrapper for accessing the Java Stanford CoreNLP software from Python. Additionally, Stanza offers biomedical and clinical English model packages for syntactic analysis and NER from biomedical literature and clinical notes.
Key features
- Tokenization, sentence segmentation, named entity recognition (NER), and dependency parsing for 60+ languages.
- Official Python wrapper for Java Stanford CoreNLP.
- Pre-trained neural pipeline models for all Universal Dependencies treebanks v2.8.
- Biomedical and clinical English model packages for syntactic analysis and NER.
- Support for batching to maximize pipeline speed.
- Interactive Jupyter notebooks and Google Colab support.
Use cases
- Natural language processing research and development.
- Analyzing biomedical literature and clinical notes.
- Building multilingual NLP applications.
- Dependency parsing and syntactic analysis.
Getting started
Install Stanza via pip:
pip install stanza
To run a basic pipeline in Python:
>>> import stanza
>>> stanza.download('en')
>>> nlp = stanza.Pipeline('en')
>>> doc = nlp("Barack Obama was born in Hawaii. He was elected president in 2008.")
>>> doc.sentences[0].print_dependencies()
For alternative installation methods (Anaconda, from source) and detailed usage, see the repository README.
License and pricing
The license is not stated in the repository metadata. The project is listed as open source.
Based on the project's public README and repository metadata.