spark-nlp 5.5.0rc1__py2.py3-none-any.whl → 5.5.2__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of spark-nlp might be problematic. Click here for more details.
- spark_nlp-5.5.2.dist-info/METADATA +345 -0
- {spark_nlp-5.5.0rc1.dist-info → spark_nlp-5.5.2.dist-info}/RECORD +25 -19
- sparknlp/__init__.py +12 -6
- sparknlp/annotator/classifier_dl/__init__.py +1 -0
- sparknlp/annotator/classifier_dl/bert_for_multiple_choice.py +161 -0
- sparknlp/annotator/cv/__init__.py +1 -0
- sparknlp/annotator/cv/blip_for_question_answering.py +172 -0
- sparknlp/annotator/embeddings/__init__.py +1 -0
- sparknlp/annotator/embeddings/auto_gguf_embeddings.py +538 -0
- sparknlp/annotator/embeddings/nomic_embeddings.py +3 -3
- sparknlp/annotator/seq2seq/auto_gguf_model.py +17 -27
- sparknlp/annotator/seq2seq/cpm_transformer.py +5 -5
- sparknlp/annotator/seq2seq/nllb_transformer.py +4 -4
- sparknlp/annotator/seq2seq/phi3_transformer.py +4 -4
- sparknlp/annotator/seq2seq/qwen_transformer.py +3 -3
- sparknlp/base/__init__.py +1 -0
- sparknlp/base/image_assembler.py +11 -0
- sparknlp/base/light_pipeline.py +20 -9
- sparknlp/base/prompt_assembler.py +207 -0
- sparknlp/internal/__init__.py +22 -0
- sparknlp/reader/__init__.py +15 -0
- sparknlp/reader/sparknlp_reader.py +121 -0
- spark_nlp-5.5.0rc1.dist-info/METADATA +0 -1357
- {spark_nlp-5.5.0rc1.dist-info → spark_nlp-5.5.2.dist-info}/.uuid +0 -0
- {spark_nlp-5.5.0rc1.dist-info → spark_nlp-5.5.2.dist-info}/WHEEL +0 -0
- {spark_nlp-5.5.0rc1.dist-info → spark_nlp-5.5.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: spark-nlp
|
|
3
|
+
Version: 5.5.2
|
|
4
|
+
Summary: 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.
|
|
5
|
+
Home-page: https://github.com/JohnSnowLabs/spark-nlp
|
|
6
|
+
Author: John Snow Labs
|
|
7
|
+
Keywords: NLP spark vision speech deep learning transformer tensorflow BERT GPT-2 Wav2Vec2 ViT
|
|
8
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Information Technology
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
16
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Classifier: Topic :: Software Development :: Internationalization
|
|
26
|
+
Classifier: Topic :: Software Development :: Localization
|
|
27
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
28
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
29
|
+
Classifier: Topic :: Scientific/Engineering
|
|
30
|
+
Classifier: Typing :: Typed
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# Spark NLP: State-of-the-Art Natural Language Processing & LLMs Library
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<a href="https://github.com/JohnSnowLabs/spark-nlp/actions" alt="build">
|
|
37
|
+
<img src="https://github.com/JohnSnowLabs/spark-nlp/workflows/build/badge.svg" /></a>
|
|
38
|
+
<a href="https://github.com/JohnSnowLabs/spark-nlp/releases" alt="Current Release Version">
|
|
39
|
+
<img src="https://img.shields.io/github/v/release/JohnSnowLabs/spark-nlp.svg?style=flat-square&logo=github" /></a>
|
|
40
|
+
<a href="https://search.maven.org/artifact/com.johnsnowlabs.nlp/spark-nlp_2.12" alt="Maven Central">
|
|
41
|
+
<img src="https://maven-badges.herokuapp.com/maven-central/com.johnsnowlabs.nlp/spark-nlp_2.12/badge.svg" /></a>
|
|
42
|
+
<a href="https://badge.fury.io/py/spark-nlp" alt="PyPI version">
|
|
43
|
+
<img src="https://badge.fury.io/py/spark-nlp.svg" /></a>
|
|
44
|
+
<a href="https://anaconda.org/JohnSnowLabs/spark-nlp" alt="Anaconda-Cloud">
|
|
45
|
+
<img src="https://anaconda.org/johnsnowlabs/spark-nlp/badges/version.svg" /></a>
|
|
46
|
+
<a href="https://github.com/JohnSnowLabs/spark-nlp/blob/master/LICENSE" alt="License">
|
|
47
|
+
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" /></a>
|
|
48
|
+
<a href="https://pypi.org/project/spark-nlp/" alt="PyPi downloads">
|
|
49
|
+
<img src="https://static.pepy.tech/personalized-badge/spark-nlp?period=total&units=international_system&left_color=grey&right_color=orange&left_text=pip%20downloads" /></a>
|
|
50
|
+
</p>
|
|
51
|
+
|
|
52
|
+
Spark NLP is a state-of-the-art Natural Language Processing library built on top of Apache Spark. It provides **simple**, **performant** & **accurate** NLP annotations for machine learning pipelines that **scale** easily in a distributed environment.
|
|
53
|
+
|
|
54
|
+
Spark NLP comes with **83000+** pretrained **pipelines** and **models** in more than **200+** languages.
|
|
55
|
+
It also offers tasks such as **Tokenization**, **Word Segmentation**, **Part-of-Speech Tagging**, Word and Sentence **Embeddings**, **Named Entity Recognition**, **Dependency Parsing**, **Spell Checking**, **Text Classification**, **Sentiment Analysis**, **Token Classification**, **Machine Translation** (+180 languages), **Summarization**, **Question Answering**, **Table Question Answering**, **Text Generation**, **Image Classification**, **Image to Text (captioning)**, **Automatic Speech Recognition**, **Zero-Shot Learning**, and many more [NLP tasks](#features).
|
|
56
|
+
|
|
57
|
+
**Spark NLP** is the only open-source NLP library in **production** that offers state-of-the-art transformers such as **BERT**, **CamemBERT**, **ALBERT**, **ELECTRA**, **XLNet**, **DistilBERT**, **RoBERTa**, **DeBERTa**, **XLM-RoBERTa**, **Longformer**, **ELMO**, **Universal Sentence Encoder**, **Llama-2**, **M2M100**, **BART**, **Instructor**, **E5**, **Google T5**, **MarianMT**, **OpenAI GPT2**, **Vision Transformers (ViT)**, **OpenAI Whisper**, **Llama**, **Mistral**, **Phi**, **Qwen2**, and many more not only to **Python** and **R**, but also to **JVM** ecosystem (**Java**, **Scala**, and **Kotlin**) at **scale** by extending **Apache Spark** natively.
|
|
58
|
+
|
|
59
|
+
## Model Importing Support
|
|
60
|
+
|
|
61
|
+
Spark NLP provides easy support for importing models from various popular frameworks:
|
|
62
|
+
|
|
63
|
+
- **TensorFlow**
|
|
64
|
+
- **ONNX**
|
|
65
|
+
- **OpenVINO**
|
|
66
|
+
- **Llama.cpp (GGUF)**
|
|
67
|
+
|
|
68
|
+
This wide range of support allows you to seamlessly integrate models from different sources into your Spark NLP workflows, enhancing flexibility and compatibility with existing machine learning ecosystems.
|
|
69
|
+
|
|
70
|
+
## Project's website
|
|
71
|
+
|
|
72
|
+
Take a look at our official Spark NLP page: [https://sparknlp.org/](https://sparknlp.org/) for user
|
|
73
|
+
documentation and examples
|
|
74
|
+
|
|
75
|
+
## Features
|
|
76
|
+
|
|
77
|
+
- [Text Preprocessing](https://sparknlp.org/docs/en/features#text-preproccesing)
|
|
78
|
+
- [Parsing and Analysis](https://sparknlp.org/docs/en/features#parsing-and-analysis)
|
|
79
|
+
- [Sentiment and Classification](https://sparknlp.org/docs/en/features#sentiment-and-classification)
|
|
80
|
+
- [Embeddings](https://sparknlp.org/docs/en/features#embeddings)
|
|
81
|
+
- [Classification and Question Answering](https://sparknlp.org/docs/en/features#classification-and-question-answering-models)
|
|
82
|
+
- [Machine Translation and Generation](https://sparknlp.org/docs/en/features#machine-translation-and-generation)
|
|
83
|
+
- [Image and Speech](https://sparknlp.org/docs/en/features#image-and-speech)
|
|
84
|
+
- [Integration and Interoperability (ONNX, OpenVINO)](https://sparknlp.org/docs/en/features#integration-and-interoperability)
|
|
85
|
+
- [Pre-trained Models (36000+ in +200 languages)](https://sparknlp.org/docs/en/features#pre-trained-models)
|
|
86
|
+
- [Multi-lingual Support](https://sparknlp.org/docs/en/features#multi-lingual-support)
|
|
87
|
+
|
|
88
|
+
## Quick Start
|
|
89
|
+
|
|
90
|
+
This is a quick example of how to use Spark NLP pre-trained pipeline in Python and PySpark:
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
$ java -version
|
|
94
|
+
# should be Java 8 or 11 (Oracle or OpenJDK)
|
|
95
|
+
$ conda create -n sparknlp python=3.7 -y
|
|
96
|
+
$ conda activate sparknlp
|
|
97
|
+
# spark-nlp by default is based on pyspark 3.x
|
|
98
|
+
$ pip install spark-nlp==5.5.2 pyspark==3.3.1
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
In Python console or Jupyter `Python3` kernel:
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
# Import Spark NLP
|
|
105
|
+
from sparknlp.base import *
|
|
106
|
+
from sparknlp.annotator import *
|
|
107
|
+
from sparknlp.pretrained import PretrainedPipeline
|
|
108
|
+
import sparknlp
|
|
109
|
+
|
|
110
|
+
# Start SparkSession with Spark NLP
|
|
111
|
+
# start() functions has 3 parameters: gpu, apple_silicon, and memory
|
|
112
|
+
# sparknlp.start(gpu=True) will start the session with GPU support
|
|
113
|
+
# sparknlp.start(apple_silicon=True) will start the session with macOS M1 & M2 support
|
|
114
|
+
# sparknlp.start(memory="16G") to change the default driver memory in SparkSession
|
|
115
|
+
spark = sparknlp.start()
|
|
116
|
+
|
|
117
|
+
# Download a pre-trained pipeline
|
|
118
|
+
pipeline = PretrainedPipeline('explain_document_dl', lang='en')
|
|
119
|
+
|
|
120
|
+
# Your testing dataset
|
|
121
|
+
text = """
|
|
122
|
+
The Mona Lisa is a 16th century oil painting created by Leonardo.
|
|
123
|
+
It's held at the Louvre in Paris.
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
# Annotate your testing dataset
|
|
127
|
+
result = pipeline.annotate(text)
|
|
128
|
+
|
|
129
|
+
# What's in the pipeline
|
|
130
|
+
list(result.keys())
|
|
131
|
+
Output: ['entities', 'stem', 'checked', 'lemma', 'document',
|
|
132
|
+
'pos', 'token', 'ner', 'embeddings', 'sentence']
|
|
133
|
+
|
|
134
|
+
# Check the results
|
|
135
|
+
result['entities']
|
|
136
|
+
Output: ['Mona Lisa', 'Leonardo', 'Louvre', 'Paris']
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
For more examples, you can visit our dedicated [examples](https://github.com/JohnSnowLabs/spark-nlp/tree/master/examples) to showcase all Spark NLP use cases!
|
|
140
|
+
|
|
141
|
+
### Packages Cheatsheet
|
|
142
|
+
|
|
143
|
+
This is a cheatsheet for corresponding Spark NLP Maven package to Apache Spark / PySpark major version:
|
|
144
|
+
|
|
145
|
+
| Apache Spark | Spark NLP on CPU | Spark NLP on GPU | Spark NLP on AArch64 (linux) | Spark NLP on Apple Silicon |
|
|
146
|
+
|-------------------------|--------------------|----------------------------|--------------------------------|--------------------------------------|
|
|
147
|
+
| 3.0/3.1/3.2/3.3/3.4/3.5 | `spark-nlp` | `spark-nlp-gpu` | `spark-nlp-aarch64` | `spark-nlp-silicon` |
|
|
148
|
+
| Start Function | `sparknlp.start()` | `sparknlp.start(gpu=True)` | `sparknlp.start(aarch64=True)` | `sparknlp.start(apple_silicon=True)` |
|
|
149
|
+
|
|
150
|
+
NOTE: `M1/M2` and `AArch64` are under `experimental` support. Access and support to these architectures are limited by the
|
|
151
|
+
community and we had to build most of the dependencies by ourselves to make them compatible. We support these two
|
|
152
|
+
architectures, however, they may not work in some environments.
|
|
153
|
+
|
|
154
|
+
## Pipelines and Models
|
|
155
|
+
|
|
156
|
+
For a quick example of using pipelines and models take a look at our official [documentation](https://sparknlp.org/docs/en/install#pipelines-and-models)
|
|
157
|
+
|
|
158
|
+
#### Please check out our Models Hub for the full list of [pre-trained models](https://sparknlp.org/models) with examples, demo, benchmark, and more
|
|
159
|
+
|
|
160
|
+
## Platform and Ecosystem Support
|
|
161
|
+
|
|
162
|
+
### Apache Spark Support
|
|
163
|
+
|
|
164
|
+
Spark NLP *5.5.2* has been built on top of Apache Spark 3.4 while fully supports Apache Spark 3.0.x, 3.1.x, 3.2.x, 3.3.x, 3.4.x, and 3.5.x
|
|
165
|
+
|
|
166
|
+
| Spark NLP | Apache Spark 3.5.x | Apache Spark 3.4.x | Apache Spark 3.3.x | Apache Spark 3.2.x | Apache Spark 3.1.x | Apache Spark 3.0.x | Apache Spark 2.4.x | Apache Spark 2.3.x |
|
|
167
|
+
|-----------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
|
|
168
|
+
| 5.5.x | YES | YES | YES | YES | YES | YES | NO | NO |
|
|
169
|
+
| 5.4.x | YES | YES | YES | YES | YES | YES | NO | NO |
|
|
170
|
+
| 5.3.x | YES | YES | YES | YES | YES | YES | NO | NO |
|
|
171
|
+
| 5.2.x | YES | YES | YES | YES | YES | YES | NO | NO |
|
|
172
|
+
| 5.1.x | Partially | YES | YES | YES | YES | YES | NO | NO |
|
|
173
|
+
| 5.0.x | YES | YES | YES | YES | YES | YES | NO | NO |
|
|
174
|
+
|
|
175
|
+
Find out more about `Spark NLP` versions from our [release notes](https://github.com/JohnSnowLabs/spark-nlp/releases).
|
|
176
|
+
|
|
177
|
+
### Scala and Python Support
|
|
178
|
+
|
|
179
|
+
| Spark NLP | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 | Python 3.10| Scala 2.11 | Scala 2.12 |
|
|
180
|
+
|-----------|------------|------------|------------|------------|------------|------------|------------|
|
|
181
|
+
| 5.5.x | NO | YES | YES | YES | YES | NO | YES |
|
|
182
|
+
| 5.4.x | NO | YES | YES | YES | YES | NO | YES |
|
|
183
|
+
| 5.3.x | NO | YES | YES | YES | YES | NO | YES |
|
|
184
|
+
| 5.2.x | NO | YES | YES | YES | YES | NO | YES |
|
|
185
|
+
| 5.1.x | NO | YES | YES | YES | YES | NO | YES |
|
|
186
|
+
| 5.0.x | NO | YES | YES | YES | YES | NO | YES |
|
|
187
|
+
|
|
188
|
+
Find out more about 4.x `SparkNLP` versions in our official [documentation](https://sparknlp.org/docs/en/install#apache-spark-support)
|
|
189
|
+
|
|
190
|
+
### Databricks Support
|
|
191
|
+
|
|
192
|
+
Spark NLP 5.5.2 has been tested and is compatible with the following runtimes:
|
|
193
|
+
|
|
194
|
+
| **CPU** | **GPU** |
|
|
195
|
+
|--------------------|--------------------|
|
|
196
|
+
| 14.1 / 14.1 ML | 14.1 ML & GPU |
|
|
197
|
+
| 14.2 / 14.2 ML | 14.2 ML & GPU |
|
|
198
|
+
| 14.3 / 14.3 ML | 14.3 ML & GPU |
|
|
199
|
+
| 15.0 / 15.0 ML | 15.0 ML & GPU |
|
|
200
|
+
| 15.1 / 15.0 ML | 15.1 ML & GPU |
|
|
201
|
+
| 15.2 / 15.0 ML | 15.2 ML & GPU |
|
|
202
|
+
| 15.3 / 15.0 ML | 15.3 ML & GPU |
|
|
203
|
+
| 15.4 / 15.0 ML | 15.4 ML & GPU |
|
|
204
|
+
|
|
205
|
+
We are compatible with older runtimes. For a full list check databricks support in our official [documentation](https://sparknlp.org/docs/en/install#databricks-support)
|
|
206
|
+
|
|
207
|
+
### EMR Support
|
|
208
|
+
|
|
209
|
+
Spark NLP 5.5.2 has been tested and is compatible with the following EMR releases:
|
|
210
|
+
|
|
211
|
+
| **EMR Release** |
|
|
212
|
+
|--------------------|
|
|
213
|
+
| emr-6.13.0 |
|
|
214
|
+
| emr-6.14.0 |
|
|
215
|
+
| emr-6.15.0 |
|
|
216
|
+
| emr-7.0.0 |
|
|
217
|
+
| emr-7.1.0 |
|
|
218
|
+
| emr-7.2.0 |
|
|
219
|
+
|
|
220
|
+
We are compatible with older EMR releases. For a full list check EMR support in our official [documentation](https://sparknlp.org/docs/en/install#emr-support)
|
|
221
|
+
|
|
222
|
+
Full list of [Amazon EMR 6.x releases](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-6x.html)
|
|
223
|
+
Full list of [Amazon EMR 7.x releases](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-7x.html)
|
|
224
|
+
|
|
225
|
+
NOTE: The EMR 6.1.0 and 6.1.1 are not supported.
|
|
226
|
+
|
|
227
|
+
## Installation
|
|
228
|
+
|
|
229
|
+
### Command line (requires internet connection)
|
|
230
|
+
|
|
231
|
+
To install spark-nlp packages through command line follow [these instructions](https://sparknlp.org/docs/en/install#command-line) from our official documentation
|
|
232
|
+
|
|
233
|
+
### Scala
|
|
234
|
+
|
|
235
|
+
Spark NLP supports Scala 2.12.15 if you are using Apache Spark 3.0.x, 3.1.x, 3.2.x, 3.3.x, and 3.4.x versions. Our packages are
|
|
236
|
+
deployed to Maven central. To add any of our packages as a dependency in your application you can follow [these instructions](https://sparknlp.org/docs/en/install#scala-and-java)
|
|
237
|
+
from our official documentation.
|
|
238
|
+
|
|
239
|
+
If you are interested, there is a simple SBT project for Spark NLP to guide you on how to use it in your
|
|
240
|
+
projects [Spark NLP SBT S5.5.2r](https://github.com/maziyarpanahi/spark-nlp-starter)
|
|
241
|
+
|
|
242
|
+
### Python
|
|
243
|
+
|
|
244
|
+
Spark NLP supports Python 3.7.x and above depending on your major PySpark version.
|
|
245
|
+
Check all available installations for Python in our official [documentation](https://sparknlp.org/docs/en/install#python)
|
|
246
|
+
|
|
247
|
+
### Compiled JARs
|
|
248
|
+
|
|
249
|
+
To compile the jars from source follow [these instructions](https://sparknlp.org/docs/en/compiled#jars) from our official documenation
|
|
250
|
+
|
|
251
|
+
## Platform-Specific Instructions
|
|
252
|
+
|
|
253
|
+
For detailed instructions on how to use Spark NLP on supported platforms, please refer to our official documentation:
|
|
254
|
+
|
|
255
|
+
| Platform | Supported Language(s) |
|
|
256
|
+
|-------------------------|-----------------------|
|
|
257
|
+
| [Apache Zeppelin](https://sparknlp.org/docs/en/install#apache-zeppelin) | Scala, Python |
|
|
258
|
+
| [Jupyter Notebook](https://sparknlp.org/docs/en/install#jupter-notebook) | Python |
|
|
259
|
+
| [Google Colab Notebook](https://sparknlp.org/docs/en/install#google-colab-notebook) | Python |
|
|
260
|
+
| [Kaggle Kernel](https://sparknlp.org/docs/en/install#kaggle-kernel) | Python |
|
|
261
|
+
| [Databricks Cluster](https://sparknlp.org/docs/en/install#databricks-cluster) | Scala, Python |
|
|
262
|
+
| [EMR Cluster](https://sparknlp.org/docs/en/install#emr-cluster) | Scala, Python |
|
|
263
|
+
| [GCP Dataproc Cluster](https://sparknlp.org/docs/en/install#gcp-dataproc) | Scala, Python |
|
|
264
|
+
|
|
265
|
+
### Offline
|
|
266
|
+
|
|
267
|
+
Spark NLP library and all the pre-trained models/pipelines can be used entirely offline with no access to the Internet.
|
|
268
|
+
Please check [these instructions](https://sparknlp.org/docs/en/install#s3-integration) from our official documentation
|
|
269
|
+
to use Spark NLP offline
|
|
270
|
+
|
|
271
|
+
## Advanced Settings
|
|
272
|
+
|
|
273
|
+
You can change Spark NLP configurations via Spark properties configuration.
|
|
274
|
+
Please check [these instructions](https://sparknlp.org/docs/en/install#sparknlp-properties) from our official documentation.
|
|
275
|
+
|
|
276
|
+
### S3 Integration
|
|
277
|
+
|
|
278
|
+
In Spark NLP we can define S3 locations to:
|
|
279
|
+
|
|
280
|
+
- Export log files of training models
|
|
281
|
+
- Store tensorflow graphs used in `NerDLApproach`
|
|
282
|
+
|
|
283
|
+
Please check [these instructions](https://sparknlp.org/docs/en/install#s3-integration) from our official documentation.
|
|
284
|
+
|
|
285
|
+
## Document5.5.2
|
|
286
|
+
|
|
287
|
+
### Examples
|
|
288
|
+
|
|
289
|
+
Need more **examples**? Check out our dedicated [Spark NLP Examples](https://github.com/JohnSnowLabs/spark-nlp/tree/master/examples)
|
|
290
|
+
repository to showcase all Spark NLP use cases!
|
|
291
|
+
|
|
292
|
+
Also, don't forget to check [Spark NLP in Action](https://sparknlp.org/demo) built by Streamlit.
|
|
293
|
+
|
|
294
|
+
#### All examples: [spark-nlp/examples](https://github.com/JohnSnowLabs/spark-nlp/tree/master/examples)
|
|
295
|
+
|
|
296
|
+
### FAQ
|
|
297
|
+
|
|
298
|
+
[Check our Articles and Videos page here](https://sparknlp.org/learn)
|
|
299
|
+
|
|
300
|
+
### Citation
|
|
301
|
+
|
|
302
|
+
We have published a [paper](https://www.sciencedirect.com/science/article/pii/S2665963821000063) that you can cite for
|
|
303
|
+
the Spark NLP library:
|
|
304
|
+
|
|
305
|
+
```bibtex
|
|
306
|
+
@article{KOCAMAN2021100058,
|
|
307
|
+
title = {Spark NLP: Natural language understanding at scale},
|
|
308
|
+
journal = {Software Impacts},
|
|
309
|
+
pages = {100058},
|
|
310
|
+
year = {2021},
|
|
311
|
+
issn = {2665-9638},
|
|
312
|
+
doi = {https://doi.org/10.1016/j.simpa.2021.100058},
|
|
313
|
+
url = {https://www.sciencedirect.com/science/article/pii/S2665963.2.300063},
|
|
314
|
+
author = {Veysel Kocaman and David Talby},
|
|
315
|
+
keywords = {Spark, Natural language processing, Deep learning, Tensorflow, Cluster},
|
|
316
|
+
abstract = {Spark NLP is a Natural Language Processing (NLP) library built on top of Apache Spark ML. It provides simple, performant & accurate NLP annotations for machine learning pipelines that can scale easily in a distributed environment. Spark NLP comes with 1100+ pretrained pipelines and models in more than 192+ languages. It supports nearly all the NLP tasks and modules that can be used seamlessly in a cluster. Downloaded more than 2.7 million times and experiencing 9x growth since January 2020, Spark NLP is used by 54% of healthcare organizations as the world’s most widely used NLP library in the enterprise.}
|
|
317
|
+
}
|
|
318
|
+
}5.5.2
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
## Community support
|
|
322
|
+
|
|
323
|
+
- [Slack](https://join.slack.com/t/spark-nlp/shared_invite/zt-198dipu77-L3UWNe_AJ8xqDk0ivmih5Q) For live discussion with the Spark NLP community and the team
|
|
324
|
+
- [GitHub](https://github.com/JohnSnowLabs/spark-nlp) Bug reports, feature requests, and contributions
|
|
325
|
+
- [Discussions](https://github.com/JohnSnowLabs/spark-nlp/discussions) Engage with other community members, share ideas,
|
|
326
|
+
and show off how you use Spark NLP!
|
|
327
|
+
- [Medium](https://medium.com/spark-nlp) Spark NLP articles
|
|
328
|
+
- [YouTube](https://www.youtube.com/channel/UCmFOjlpYEhxf_wJUDuz6xxQ/videos) Spark NLP video tutorials
|
|
329
|
+
|
|
330
|
+
## Contributing
|
|
331
|
+
|
|
332
|
+
We appreciate any sort of contributions:
|
|
333
|
+
|
|
334
|
+
- ideas
|
|
335
|
+
- feedback
|
|
336
|
+
- documentation
|
|
337
|
+
- bug reports
|
|
338
|
+
- NLP training and testing corpora
|
|
339
|
+
- Development and testing
|
|
340
|
+
|
|
341
|
+
Clone the repo and submit your pull-requests! Or directly create issues in this repo.
|
|
342
|
+
|
|
343
|
+
## John Snow Labs
|
|
344
|
+
|
|
345
|
+
[http://johnsnowlabs.com](http://johnsnowlabs.com)
|
|
@@ -3,7 +3,7 @@ com/johnsnowlabs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
3
3
|
com/johnsnowlabs/ml/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
com/johnsnowlabs/ml/ai/__init__.py,sha256=YQiK2M7U4d8y5irPy_HB8ae0mSpqS9583MH44pnKJXc,295
|
|
5
5
|
com/johnsnowlabs/nlp/__init__.py,sha256=DPIVXtONO5xXyOk-HB0-sNiHAcco17NN13zPS_6Uw8c,294
|
|
6
|
-
sparknlp/__init__.py,sha256=
|
|
6
|
+
sparknlp/__init__.py,sha256=cdvKsW7Cb_LLCaot-GsMcb8n0RUXqr9NRpsallJamq0,13783
|
|
7
7
|
sparknlp/annotation.py,sha256=I5zOxG5vV2RfPZfqN9enT1i4mo6oBcn3Lrzs37QiOiA,5635
|
|
8
8
|
sparknlp/annotation_audio.py,sha256=iRV_InSVhgvAwSRe9NTbUH9v6OGvTM-FPCpSAKVu0mE,1917
|
|
9
9
|
sparknlp/annotation_image.py,sha256=xhCe8Ko-77XqWVuuYHFrjKqF6zPd8Z-RY_rmZXNwCXU,2547
|
|
@@ -30,12 +30,13 @@ sparknlp/annotator/audio/__init__.py,sha256=dXjtvi5c0aTZFq1Q_JciUd1uFTBVSJoUdcq0
|
|
|
30
30
|
sparknlp/annotator/audio/hubert_for_ctc.py,sha256=76PfwPZZvOHU5kfDqLueCFbmqa4W8pMNRGoCvOqjsEA,7859
|
|
31
31
|
sparknlp/annotator/audio/wav2vec2_for_ctc.py,sha256=K78P1U6vA4O1UufsLYzy0H7arsKNmwPcIV7kzDFsA5Q,6210
|
|
32
32
|
sparknlp/annotator/audio/whisper_for_ctc.py,sha256=uII51umuohqwnAW0Q7VdxEFyr_j5LMnfpcRlf8TbetA,9800
|
|
33
|
-
sparknlp/annotator/classifier_dl/__init__.py,sha256=
|
|
33
|
+
sparknlp/annotator/classifier_dl/__init__.py,sha256=4v2_3kSWQFFBc_KzaJ0gEC6ANVJpy5tsHa6CJGc4nCw,4005
|
|
34
34
|
sparknlp/annotator/classifier_dl/albert_for_question_answering.py,sha256=LG2dL6Fky1T35yXTUZBfIihIIGnkRFQ7ECQ3HRXXEG8,6517
|
|
35
35
|
sparknlp/annotator/classifier_dl/albert_for_sequence_classification.py,sha256=kWx7f9pcKE2qw319gn8FN0Md5dX38gbmfeoY9gWCLNk,7842
|
|
36
36
|
sparknlp/annotator/classifier_dl/albert_for_token_classification.py,sha256=5rdsjWnsAVmtP-idU7ATKJ8lkH2rtlKZLnpi4Mq27eI,6839
|
|
37
37
|
sparknlp/annotator/classifier_dl/albert_for_zero_shot_classification.py,sha256=_TgV6EiIOiD_djA3fxfoz-o37mzMeKbn6iL2kZ6GzO0,8366
|
|
38
38
|
sparknlp/annotator/classifier_dl/bart_for_zero_shot_classification.py,sha256=yqQeDdpLbNOKuSZejZjSAjT8ydYyxsTVf2aFDgSSDfc,8767
|
|
39
|
+
sparknlp/annotator/classifier_dl/bert_for_multiple_choice.py,sha256=Ew_NGBj7F5ApgK3SyQh2HIfjD7ZTqTs0LZEQxjwoyto,5936
|
|
39
40
|
sparknlp/annotator/classifier_dl/bert_for_question_answering.py,sha256=2euY_RAdMPA4IHJXZAd5MkQojFOtFNhB_hSc1iVQ5DQ,6433
|
|
40
41
|
sparknlp/annotator/classifier_dl/bert_for_sequence_classification.py,sha256=AzD3RQcRuQc0DDTbL6vGiacTtHlZnbAqksNvRQq7EQE,7800
|
|
41
42
|
sparknlp/annotator/classifier_dl/bert_for_token_classification.py,sha256=uJXoDLPfPWiRmKqtw_3lLBvneIirj87S2JWwfd33zq8,6668
|
|
@@ -74,7 +75,8 @@ sparknlp/annotator/classifier_dl/xlnet_for_sequence_classification.py,sha256=CI9
|
|
|
74
75
|
sparknlp/annotator/classifier_dl/xlnet_for_token_classification.py,sha256=SndQpIfslsSYEOX-myLjpUS6-wVIeDG8MOhJYcu2_7M,6739
|
|
75
76
|
sparknlp/annotator/coref/__init__.py,sha256=SG8MAaVxQpoYYAsyKaoOlvlHjorDzj3DHt4nnEdBWm8,53
|
|
76
77
|
sparknlp/annotator/coref/spanbert_coref.py,sha256=AXWJhvVquY2uoApO_Np1fz7_KyJhxnZB4i-xk78sBfc,8407
|
|
77
|
-
sparknlp/annotator/cv/__init__.py,sha256=
|
|
78
|
+
sparknlp/annotator/cv/__init__.py,sha256=194aJ5N5eE3HOYRzAAdroHTTQ0o1qyCrgyRLddvqBp0,1006
|
|
79
|
+
sparknlp/annotator/cv/blip_for_question_answering.py,sha256=At7L5pPBNDR1r-JGLKM5b3dTrq5Ecz9r0M1gToUVZTs,6551
|
|
78
80
|
sparknlp/annotator/cv/clip_for_zero_shot_classification.py,sha256=_1pLc9BiFrFN10eJPCDJLJT-vdnTSG9OnB25Y_kKJIA,7528
|
|
79
81
|
sparknlp/annotator/cv/convnext_for_image_classification.py,sha256=KzaAlYW5M2l73zUozzgg8_p14eGDz9k9PYVAUZLN25k,11874
|
|
80
82
|
sparknlp/annotator/cv/swin_for_image_classification.py,sha256=iZ1KY0GInbQmGzkmuNbds4PGPwCheLXc-Syv2HRmqug,10694
|
|
@@ -83,8 +85,9 @@ sparknlp/annotator/cv/vit_for_image_classification.py,sha256=D2V3pxAd3rBi1817lxV
|
|
|
83
85
|
sparknlp/annotator/dependency/__init__.py,sha256=eV43oXAGaYl2N1XKIEAAZJLNP8gpHm8VxuXDeDlQzR4,774
|
|
84
86
|
sparknlp/annotator/dependency/dependency_parser.py,sha256=SxyvHPp8Hs1Xnm5X1nLTMi095XoQMtfL8pbys15mYAI,11212
|
|
85
87
|
sparknlp/annotator/dependency/typed_dependency_parser.py,sha256=60vPdYkbFk9MPGegg3m9Uik9cMXpMZd8tBvXG39gNww,12456
|
|
86
|
-
sparknlp/annotator/embeddings/__init__.py,sha256=
|
|
88
|
+
sparknlp/annotator/embeddings/__init__.py,sha256=KHDCHb8SMlkSGGSu69SfKneUDDUlBdMGdMzDrYp_cis,2408
|
|
87
89
|
sparknlp/annotator/embeddings/albert_embeddings.py,sha256=6Rd1LIn8oFIpq_ALcJh-RUjPEO7Ht8wsHY6JHSFyMkw,9995
|
|
90
|
+
sparknlp/annotator/embeddings/auto_gguf_embeddings.py,sha256=ngqjiXUqkL3xOrmt42bY8pp7azgbIWqXGfbKud1CijM,19981
|
|
88
91
|
sparknlp/annotator/embeddings/bert_embeddings.py,sha256=HVUjkg56kBcpGZCo-fmPG5uatMDF3swW_lnbpy1SgSI,8463
|
|
89
92
|
sparknlp/annotator/embeddings/bert_sentence_embeddings.py,sha256=NQy9KuXT9aKsTpYCR5RAeoFWI2YqEGorbdYrf_0KKmw,9148
|
|
90
93
|
sparknlp/annotator/embeddings/bge_embeddings.py,sha256=hXFFd9HOru1w2L9N5YGSZlaKyxqMsZccpaI4Z8-bNUE,7919
|
|
@@ -99,7 +102,7 @@ sparknlp/annotator/embeddings/instructor_embeddings.py,sha256=CTKmbuBOx_KBM4JM-Y
|
|
|
99
102
|
sparknlp/annotator/embeddings/longformer_embeddings.py,sha256=jS4fxB5O0-d9ta9VKv8ai-17n5YHt5rML8QxUw7K4Io,8754
|
|
100
103
|
sparknlp/annotator/embeddings/mpnet_embeddings.py,sha256=7d6E4lS7jjkppDPvty1UHNNrbykkriFiysrxZ_RzL0U,7875
|
|
101
104
|
sparknlp/annotator/embeddings/mxbai_embeddings.py,sha256=kCaYcM3lLYJjhElLK5isdxzJqIvoGZlUKKNkySMUkE8,6017
|
|
102
|
-
sparknlp/annotator/embeddings/nomic_embeddings.py,sha256=
|
|
105
|
+
sparknlp/annotator/embeddings/nomic_embeddings.py,sha256=WTllH3htx9wDD2Le8pZgKVPM_U8XNmroJb6f4PeVeP8,7347
|
|
103
106
|
sparknlp/annotator/embeddings/roberta_embeddings.py,sha256=q_WHby2lDcPc5bVHkGc6X_GwT3qyDUBLUVz5ZW4HCSY,9229
|
|
104
107
|
sparknlp/annotator/embeddings/roberta_sentence_embeddings.py,sha256=KVrD4z_tIU-sphK6dmbbnHBBt8-Y89C_BFQAkN99kZo,8181
|
|
105
108
|
sparknlp/annotator/embeddings/sentence_embeddings.py,sha256=azuA1FKMtTJ9suwJqTEHeWHumT6kYdfURTe_1fsqcB8,5402
|
|
@@ -145,19 +148,19 @@ sparknlp/annotator/sentiment/__init__.py,sha256=Lq3vKaZS1YATLMg0VNXSVtkWL5q5G9ta
|
|
|
145
148
|
sparknlp/annotator/sentiment/sentiment_detector.py,sha256=m545NGU0Xzg_PO6_qIfpli1uZj7JQcyFgqe9R6wAPFI,8154
|
|
146
149
|
sparknlp/annotator/sentiment/vivekn_sentiment.py,sha256=4rpXWDgzU6ddnbrSCp9VdLb2epCc9oZ3c6XcqxEw8nk,9655
|
|
147
150
|
sparknlp/annotator/seq2seq/__init__.py,sha256=Fdz1zsxpB6vM2a0sKuGCSMD1ZgqeVqAez0-AtppMGB4,1541
|
|
148
|
-
sparknlp/annotator/seq2seq/auto_gguf_model.py,sha256=
|
|
151
|
+
sparknlp/annotator/seq2seq/auto_gguf_model.py,sha256=pTQq3KztHQq3fybdCmXEq5wTlb0t-5ANCfdQ_-7oQRg,38343
|
|
149
152
|
sparknlp/annotator/seq2seq/bart_transformer.py,sha256=I1flM4yeCzEAKOdQllBC30XuedxVJ7ferkFhZ6gwEbE,18481
|
|
150
|
-
sparknlp/annotator/seq2seq/cpm_transformer.py,sha256=
|
|
153
|
+
sparknlp/annotator/seq2seq/cpm_transformer.py,sha256=0CnBFMlxMu0pD2QZMHyoGtIYgXqfUQm68vr6zEAa6Eg,13290
|
|
151
154
|
sparknlp/annotator/seq2seq/gpt2_transformer.py,sha256=Oz95R_NRR4tWHu_bW6Ak2832ZILXycp3ify7LfRSi8o,15310
|
|
152
155
|
sparknlp/annotator/seq2seq/llama2_transformer.py,sha256=3LzTR0VerFdFmOizsrs2Q7HTnjELJ5WtfUgx5XnOqGM,13898
|
|
153
156
|
sparknlp/annotator/seq2seq/llama3_transformer.py,sha256=dA3rIEVOLmlnJwhqkYmL_GrrcRVpoUY_i7QIyA5N2jM,14920
|
|
154
157
|
sparknlp/annotator/seq2seq/m2m100_transformer.py,sha256=uIL9RZuuryTIdAy9TbJf9wbz6RekhW8S079bJhaB6i4,16116
|
|
155
158
|
sparknlp/annotator/seq2seq/marian_transformer.py,sha256=mQ4Ylh7ZzXAOue8f-x0gqzfS3vAz3XUdD7eQ2XhcEs4,13781
|
|
156
159
|
sparknlp/annotator/seq2seq/mistral_transformer.py,sha256=PJegrSQts_58rkt96xaHlqU1fKIaz8hxt7DTPkGS10A,14254
|
|
157
|
-
sparknlp/annotator/seq2seq/nllb_transformer.py,sha256=
|
|
160
|
+
sparknlp/annotator/seq2seq/nllb_transformer.py,sha256=hOmdJOgl_-_PxoADrV-tVYmlfFrqNwvn6Vn2RC4siZM,19534
|
|
158
161
|
sparknlp/annotator/seq2seq/phi2_transformer.py,sha256=WwKCUOH8qGFv62YF63HjuT7bMVldh06gHvaZH3tbSDk,13787
|
|
159
|
-
sparknlp/annotator/seq2seq/phi3_transformer.py,sha256=
|
|
160
|
-
sparknlp/annotator/seq2seq/qwen_transformer.py,sha256=
|
|
162
|
+
sparknlp/annotator/seq2seq/phi3_transformer.py,sha256=arIcw5NDMv3ubBwWz3KYRdLMsspTiEI8vk4s00lyq1c,14293
|
|
163
|
+
sparknlp/annotator/seq2seq/qwen_transformer.py,sha256=cOpOlz5r_apmVHZgp7uFjybSzVj2yxv8QYlYcGwFyKg,14645
|
|
161
164
|
sparknlp/annotator/seq2seq/starcoder_transformer.py,sha256=BTXbSMRpXnDvrfh-6iFS5k6g6EcPV9zBl4U-SSC19wA,14293
|
|
162
165
|
sparknlp/annotator/seq2seq/t5_transformer.py,sha256=wDVxNLluIU1HGZFqaKKc4YTt4l-elPlAtQ7EEa0f5tg,17308
|
|
163
166
|
sparknlp/annotator/similarity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -173,7 +176,7 @@ sparknlp/annotator/token/regex_tokenizer.py,sha256=FG2HvFwMb1G_4grfyIQaeBpaAgKv_
|
|
|
173
176
|
sparknlp/annotator/token/tokenizer.py,sha256=Me3P3wogUKUJ7O7_2wLdPzF00vKpp_sHuiztpGWRVpU,19939
|
|
174
177
|
sparknlp/annotator/ws/__init__.py,sha256=-l8bnl8Z6lGXWOBdRIBZ6958fzTHt4o87QhhLHIFF8A,693
|
|
175
178
|
sparknlp/annotator/ws/word_segmenter.py,sha256=rrbshwn5wzXIHpCCDji6ZcsmiARpuA82_p_6TgNHfRc,16365
|
|
176
|
-
sparknlp/base/__init__.py,sha256=
|
|
179
|
+
sparknlp/base/__init__.py,sha256=fCL-kReIavZceUa1OC99pSRH7MsXzqGB8BXgzVS_f7s,1311
|
|
177
180
|
sparknlp/base/audio_assembler.py,sha256=HKa9mXvmuMUrjTihUZkppGj-WJjcUrm2BGapNuPifyI,3320
|
|
178
181
|
sparknlp/base/doc2_chunk.py,sha256=TyvbdJNkVo9favHlOEoH5JwKbjpk5ZVJ75p8Cilp9jM,6551
|
|
179
182
|
sparknlp/base/document_assembler.py,sha256=zl-SXWMTR3B0EZ8z6SWYchCwEo-61FhU6u7dHUKDIOg,6697
|
|
@@ -182,9 +185,10 @@ sparknlp/base/finisher.py,sha256=V4wkMm9Ug09q4zTQc9T9Wr-awmu2Hu-eNaJ039YgZXM,858
|
|
|
182
185
|
sparknlp/base/graph_finisher.py,sha256=a8fxk3ei2YQw6s0Y9Yy8oMOF1i1XUrgqaiwVE0VPt4w,4834
|
|
183
186
|
sparknlp/base/has_recursive_fit.py,sha256=P55rSHLIXhihXWS2bOC_DskcQTc3njieVD1JkjS2bcA,849
|
|
184
187
|
sparknlp/base/has_recursive_transform.py,sha256=UkGNgo4LMsjQC-Coeefg4bJcg7FoPcPiG382zEa6Ywk,841
|
|
185
|
-
sparknlp/base/image_assembler.py,sha256=
|
|
186
|
-
sparknlp/base/light_pipeline.py,sha256=
|
|
188
|
+
sparknlp/base/image_assembler.py,sha256=HH7ZJ-iZCXnBXVXekQLb1ei_HJuVxhYNVb94OrVLmeY,4068
|
|
189
|
+
sparknlp/base/light_pipeline.py,sha256=2lOstyyK0o6L3BHPIZWQBpIKtJ7LcSz3Pvgo6eZDs5U,17023
|
|
187
190
|
sparknlp/base/multi_document_assembler.py,sha256=4htET1fRAeOB6zhsNXsBq5rKZvn-LGD4vrFRjPZeqow,7070
|
|
191
|
+
sparknlp/base/prompt_assembler.py,sha256=ysU4Vbmnuv2UBHK0JBkYrxiZiJ7_GTcVMip1-QRmheI,11570
|
|
188
192
|
sparknlp/base/recursive_pipeline.py,sha256=V9rTnu8KMwgjoceykN9pF1mKGtOkkuiC_n9v8dE3LDk,4279
|
|
189
193
|
sparknlp/base/table_assembler.py,sha256=Kxu3R2fY6JgCxEc07ibsMsjip6dgcPDHLiWAZ8gC_d8,5102
|
|
190
194
|
sparknlp/base/token_assembler.py,sha256=qiHry07L7mVCqeHSH6hHxLygv1AsfZIE4jy1L75L3Do,5075
|
|
@@ -200,7 +204,7 @@ sparknlp/common/read_as.py,sha256=imxPGwV7jr4Li_acbo0OAHHRGCBbYv-akzEGaBWEfcY,12
|
|
|
200
204
|
sparknlp/common/recursive_annotator_approach.py,sha256=vqugBw22cE3Ff7PIpRlnYFuOlchgL0nM26D8j-NdpqU,1449
|
|
201
205
|
sparknlp/common/storage.py,sha256=D91H3p8EIjNspjqAYu6ephRpCUtdcAir4_PrAbkIQWE,4842
|
|
202
206
|
sparknlp/common/utils.py,sha256=Yne6yYcwKxhOZC-U4qfYoDhWUP_6BIaAjI5X_P_df1E,1306
|
|
203
|
-
sparknlp/internal/__init__.py,sha256=
|
|
207
|
+
sparknlp/internal/__init__.py,sha256=BttGS21n2-LGjx8udi7f4_nNt_BeUnfif9WpeZchuFE,34502
|
|
204
208
|
sparknlp/internal/annotator_java_ml.py,sha256=UGPoThG0rGXUOXGSQnDzEDW81Mu1s5RPF29v7DFyE3c,1187
|
|
205
209
|
sparknlp/internal/annotator_transformer.py,sha256=fXmc2IWXGybqZpbEU9obmbdBYPc798y42zvSB4tqV9U,1448
|
|
206
210
|
sparknlp/internal/extended_java_wrapper.py,sha256=hwP0133-hDiDf5sBF-P3MtUsuuDj1PpQbtGZQIRwzfk,2240
|
|
@@ -212,6 +216,8 @@ sparknlp/pretrained/__init__.py,sha256=GV-x9UBK8F2_IR6zYatrzFcVJtkSUIMbxqWsxRUeP
|
|
|
212
216
|
sparknlp/pretrained/pretrained_pipeline.py,sha256=lquxiaABuA68Rmu7csamJPqBoRJqMUO0oNHsmEZDAIs,5740
|
|
213
217
|
sparknlp/pretrained/resource_downloader.py,sha256=8_-rpvO2LsX_Lq4wMPif2ca3RlJZWEabt8pDm2xymiI,7806
|
|
214
218
|
sparknlp/pretrained/utils.py,sha256=T1MrvW_DaWk_jcOjVLOea0NMFE9w8fe0ZT_5urZ_nEY,1099
|
|
219
|
+
sparknlp/reader/__init__.py,sha256=-Toj3AIBki-zXPpV8ezFTI2LX1yP_rK2bhpoa8nBkTw,685
|
|
220
|
+
sparknlp/reader/sparknlp_reader.py,sha256=SLQ5KCWbHnR4S0DwdjRQw_NvaUTchrE0gVCHs__xAy8,17054
|
|
215
221
|
sparknlp/training/__init__.py,sha256=qREi9u-5Vc2VjpL6-XZsyvu5jSEIdIhowW7_kKaqMqo,852
|
|
216
222
|
sparknlp/training/conll.py,sha256=wKBiSTrjc6mjsl7Nyt6B8f4yXsDJkZb-sn8iOjix9cE,6961
|
|
217
223
|
sparknlp/training/conllu.py,sha256=8r3i-tmyrLsyk1DtZ9uo2mMDCWb1yw2Y5W6UsV13MkY,4953
|
|
@@ -242,8 +248,8 @@ sparknlp/training/_tf_graph_builders_1x/ner_dl/dataset_encoder.py,sha256=R4yHFN3
|
|
|
242
248
|
sparknlp/training/_tf_graph_builders_1x/ner_dl/ner_model.py,sha256=EoCSdcIjqQ3wv13MAuuWrKV8wyVBP0SbOEW41omHlR0,23189
|
|
243
249
|
sparknlp/training/_tf_graph_builders_1x/ner_dl/ner_model_saver.py,sha256=k5CQ7gKV6HZbZMB8cKLUJuZxoZWlP_DFWdZ--aIDwsc,2356
|
|
244
250
|
sparknlp/training/_tf_graph_builders_1x/ner_dl/sentence_grouper.py,sha256=pAxjWhjazSX8Vg0MFqJiuRVw1IbnQNSs-8Xp26L4nko,870
|
|
245
|
-
spark_nlp-5.5.
|
|
246
|
-
spark_nlp-5.5.
|
|
247
|
-
spark_nlp-5.5.
|
|
248
|
-
spark_nlp-5.5.
|
|
249
|
-
spark_nlp-5.5.
|
|
251
|
+
spark_nlp-5.5.2.dist-info/.uuid,sha256=1f6hF51aIuv9yCvh31NU9lOpS34NE-h3a0Et7R9yR6A,36
|
|
252
|
+
spark_nlp-5.5.2.dist-info/METADATA,sha256=iFDm_OdynA95nwoWm1vbJcF3i7uuRSnn7S9eU1t5_3c,19156
|
|
253
|
+
spark_nlp-5.5.2.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
|
|
254
|
+
spark_nlp-5.5.2.dist-info/top_level.txt,sha256=uuytur4pyMRw2H_txNY2ZkaucZHUs22QF8-R03ch_-E,13
|
|
255
|
+
spark_nlp-5.5.2.dist-info/RECORD,,
|
sparknlp/__init__.py
CHANGED
|
@@ -12,17 +12,20 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
import sys
|
|
16
15
|
import subprocess
|
|
16
|
+
import sys
|
|
17
17
|
import threading
|
|
18
|
+
|
|
19
|
+
from pyspark.conf import SparkConf
|
|
20
|
+
from pyspark.context import SparkContext
|
|
21
|
+
from pyspark.java_gateway import launch_gateway
|
|
18
22
|
from pyspark.sql import SparkSession
|
|
23
|
+
|
|
19
24
|
from sparknlp import annotator
|
|
20
25
|
# Must be declared here one by one or else PretrainedPipeline will fail with AttributeError
|
|
21
26
|
from sparknlp.base import DocumentAssembler, MultiDocumentAssembler, Finisher, EmbeddingsFinisher, TokenAssembler, \
|
|
22
27
|
Doc2Chunk, AudioAssembler, GraphFinisher, ImageAssembler, TableAssembler
|
|
23
|
-
from
|
|
24
|
-
from pyspark.context import SparkContext
|
|
25
|
-
from pyspark.java_gateway import launch_gateway
|
|
28
|
+
from sparknlp.reader import SparkNLPReader
|
|
26
29
|
|
|
27
30
|
sys.modules['com.johnsnowlabs.nlp.annotators'] = annotator
|
|
28
31
|
sys.modules['com.johnsnsowlabs.nlp.annotators.tokenizer'] = annotator
|
|
@@ -129,7 +132,7 @@ def start(gpu=False,
|
|
|
129
132
|
The initiated Spark session.
|
|
130
133
|
|
|
131
134
|
"""
|
|
132
|
-
current_version = "5.5.
|
|
135
|
+
current_version = "5.5.2"
|
|
133
136
|
|
|
134
137
|
if params is None:
|
|
135
138
|
params = {}
|
|
@@ -301,6 +304,9 @@ def start(gpu=False,
|
|
|
301
304
|
spark_session = start_without_realtime_output()
|
|
302
305
|
return spark_session
|
|
303
306
|
|
|
307
|
+
def read(params=None):
|
|
308
|
+
spark_session = start()
|
|
309
|
+
return SparkNLPReader(spark_session, params)
|
|
304
310
|
|
|
305
311
|
def version():
|
|
306
312
|
"""Returns the current Spark NLP version.
|
|
@@ -310,4 +316,4 @@ def version():
|
|
|
310
316
|
str
|
|
311
317
|
The current Spark NLP version.
|
|
312
318
|
"""
|
|
313
|
-
return '5.5.
|
|
319
|
+
return '5.5.2'
|
|
@@ -54,3 +54,4 @@ from sparknlp.annotator.classifier_dl.mpnet_for_question_answering import *
|
|
|
54
54
|
from sparknlp.annotator.classifier_dl.mpnet_for_token_classification import *
|
|
55
55
|
from sparknlp.annotator.classifier_dl.albert_for_zero_shot_classification import *
|
|
56
56
|
from sparknlp.annotator.classifier_dl.camembert_for_zero_shot_classification import *
|
|
57
|
+
from sparknlp.annotator.classifier_dl.bert_for_multiple_choice import *
|