spark-nlp
John Snow Labs Spark NLP is a natural language processing library built on top of Apache Spark ML. It provides simple, performant & accurate NLP annotations for machine learning pipelines, that scale easily in a distributed environment.
What it is and what it does
Spark NLP is a natural language processing library built on top of Apache Spark that brings NLP and machine learning to distributed environments. It provides access to pretrained pipelines and models across multiple languages, supporting tasks like tokenization, part-of-speech tagging, named entity recognition, sentiment analysis, machine translation, question answering, and text generation. The library integrates state-of-the-art transformer models and can import models from TensorFlow, ONNX, and OpenVINO frameworks.
The package is designed for production use and scales across distributed Spark clusters. It supports multiple programming languages through the JVM ecosystem and offers specialized variants for GPU acceleration, Apple Silicon, and AArch64 architectures. The library requires Java 8 or 11 and Apache Spark 3.0 or later.
Use it for:
- Build production NLP pipelines that scale across Spark clusters for large-scale text processing
- Extract named entities, perform sentiment analysis, or classify documents using pretrained models
- Translate text between languages or generate summaries and answers from documents
- Integrate transformer models into Spark ML workflows for feature engineering
- Process multilingual text data in a single distributed pipeline
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Spark NLP provides distributed natural language processing on Apache Spark, offering pretrained pipelines and models for tokenization, named entity recognition, sentiment analysis, machine translation, and embeddings across multiple languages.
Yes, if you need production-grade NLP at scale on Spark. The library is actively maintained with no security vulnerabilities and offers a comprehensive suite of pretrained models and tasks. Install only if you already have Apache Spark 3.0+ and Java 8 or 11 in your environment; it is not suitable for lightweight single-machine NLP work.
Install
spark-nlp on PyPI
pip
pip install spark-nlpuv
uv add spark-nlppoetry
poetry add spark-nlpInstalling spark-nlp
Before you install
Installation is straightforward (low friction) with no runtime dependencies to manage. The package is actively maintained with a recent release 51 days ago. Requires Java 8 or 11 and Apache Spark 3.0+ to be present in your environment.
License in practice
Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install spark-nlp==6.4.2
from sparknlp.base import *
from sparknlp.annotator import *
from sparknlp.pretrained import PretrainedPipeline
pipeline = PretrainedPipeline('explain_document_dl', lang='en')
result = pipeline.annotate("The Mona Lisa is a 16th century oil painting created by Leonardo.")
Requires Java 8 or 11 (Oracle or OpenJDK) and Apache Spark 3.0+ to be installed and configured in your environment.
Verify before relying
- Whether pretrained model downloads are automatic or require separate setup steps
- Memory and disk requirements for downloading and caching pretrained models
- Performance characteristics on single-machine vs. true distributed clusters
- Exact Python version support (classifiers list 3.6–3.9 but requires_python is unspecified)
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 51 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,180,010/month — #4,260 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: spark_nlp-6.4.2-py2.py3-none-any.whl
Keywords: NLP, spark, vision, speech, deep, learning, transformer, tensorflow, BERT, GPT-2, Wav2Vec2, ViT
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
flairFlair is a PyTorch-based NLP framework that…
permissive · top 15,000 on PyPI
torchtexttorchtext provides text datasets, preprocessing…
permissive · top 15,000 on PyPI
spacyspaCy is an industrial-strength NLP library…
permissive · top 1,000 on PyPI
textblobTextBlob provides a simple API for common…
permissive · top 5,000 on PyPI
keras-nlpKeras-NLP provides pretrained models and…
permissive · top 15,000 on PyPI
polyglotPolyglot is a multilingual natural language…
copyleft · top 15,000 on PyPI
google-cloud-languagePython client library for Google Cloud Natural…
permissive · top 1,000 on PyPI
urduhackUrduhack provides NLP preprocessing,…
permissive · top 15,000 on PyPI
mleapSerializes and deserializes machine learning…
permissive · top 5,000 on PyPI
synapsemlSynapseML is a distributed machine learning…
permissive · top 5,000 on PyPI