skillfed

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.

spark-nlp v6.4.2 1.2M downloads/30d#4,260 on PyPI4,155
Permissive license Active released

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-nlp

uv

uv add spark-nlp

poetry

poetry add spark-nlp

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Information AnalysisTopic :: Software Development :: Build ToolsTopic :: Software Development :: InternationalizationTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: LocalizationTopic :: Text Processing :: LinguisticTyping :: Typed

Tags

distributed NLP on Sparkpretrained NLP pipelinesnamed entity recognitionsentiment analysis at scalemachine translationtext embeddingstransformer models for NLP
distributed-nlpspark-mltransformers

More Scientific/Engineering packages