JohnSnowLabs/spark-nlp
State of the Art Natural Language Processing
What it solves
Processing massive amounts of text is slow and complex when you have thousands of documents. Spark NLP solves this by bringing modern NLP and large language model (LLM) capabilities directly into Apache Spark, so you can run tasks like tagging, classification, translation, and question answering across a distributed cluster without moving data out of your big-data environment.
How it works
Spark NLP extends Apache Spark natively, meaning it works as a set of Spark transformers and annotators that plug into your existing data pipelines. You start a Spark session, download a pre-trained pipeline (hundreds of thousands are available in over 200 languages), and then call pipeline.annotate() on your text. Under the hood, it uses Spark’s distributed processing to split the work across many machines. It also supports importing models from TensorFlow, ONNX, OpenVINO, and llama.cpp, and it runs on Python, Scala, Java, Kotlin, and R.
Who it’s for
Data engineers and machine learning teams who already work with Apache Spark and need to add NLP or LLM steps to their data processing at scale. It’s also for developers who want a production-ready library that works on Databricks, Amazon EMR, and other Spark-based platforms (from the README’s compatibility tables).
Highlights
- 100,000+ pre-trained pipelines and models in 200+ languages.
- Tasks include tokenization, named entity recognition, sentiment analysis, machine translation, summarization, question answering, image classification, speech recognition, and more.
- Works with modern transformers like BERT, Llama, Mistral, GPT-2, Whisper, and many others.
- Native integration with Apache Spark (3.x and 4.x) for distributed scaling.
- Supports CPU, GPU, and Apple Silicon variants through different start options.
- Offline usage is possible—all models can be downloaded ahead of time.
Related
- Project
- Project
- Project
- Project
- Project