Spark NLP Overview
- 30Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
Under which license is Spark NLP released?
Under which license is Spark NLP released?
30 questions
- 1
Under which license is Spark NLP released?
- A
GPL 3.0
- B
Apache 2.0
- C
BSD 3-Clause
- D
MIT
Correct answer
BApache 2.0
Explanation
Spark NLP is released under the Apache 2.0 license, making it free for both personal and commercial use.
- A
- 2
Which programming languages does Spark NLP support?
- A
Python, Java, and Scala only
- B
Python, Java, Scala, and some R bindings
- C
Python, Java, Scala, and R bindings
- D
Python, Java, Scala, and .NET bindings
Correct answer
BPython, Java, Scala, and some R bindings
Explanation
Spark NLP supports Python, Java, Scala, and also some R bindings.
- A
- 3
What is the relationship between Spark NLP pipelines and Spark ML pipelines?
- A
Spark ML pipelines can be converted to Spark NLP pipelines
- B
Every Spark NLP pipeline is a Spark ML pipeline as well
- C
Spark NLP pipelines are built on top of Spark MLlib
- D
Spark NLP pipelines are independent of Spark ML pipelines
Correct answer
BEvery Spark NLP pipeline is a Spark ML pipeline as well
Explanation
Every Spark NLP pipeline is a Spark ML pipeline, allowing native integration with Apache Spark.
- A
- 4
According to the O'Reilly surveys, how is Spark NLP positioned among enterprise NLP libraries?
- A
It is the most widely used NLP library by practitioners in the enterprise
- B
It is the second most widely used NLP library
- C
It is the most accurate but least used library
- D
It is the leading open-source library for research
Correct answer
AIt is the most widely used NLP library by practitioners in the enterprise
Explanation
Spark NLP is the most widely used NLP library by practitioners in the enterprise, as confirmed by multiple O'Reilly surveys.
- A
- 5
What is one of the main reasons Spark NLP was designed to handle the entire NLP pipeline?
- A
To enable offline processing without internet access
- B
To support more programming languages than other libraries
- C
To reduce the number of required software dependencies
- D
To avoid unnecessary copying of data and moving data between libraries
Correct answer
DTo avoid unnecessary copying of data and moving data between libraries
Explanation
Spark NLP aims to provide a complete pipeline in one library to avoid unnecessary data copying and movement between libraries or processes, enabling all optimizations to work together.
- A
- 6
In which industries is Spark NLP heavily used?
- A
Education, entertainment, and social media
- B
Energy, transportation, and agriculture
- C
Retail, manufacturing, and logistics
- D
Healthcare, finance, and insurance
Correct answer
DHealthcare, finance, and insurance
Explanation
Spark NLP is heavily used in healthcare, life sciences, finance, and insurance, which are high-compliance industries.
- A
- 7
What are the three basic design goals of Spark NLP?
- A
State-of-the-art accuracy, speed, and scalability
- B
Low memory usage, high throughput, and multi-language support
- C
Ease of use, documentation, and community support
- D
Open-source, free, and cross-platform compatibility
Correct answer
AState-of-the-art accuracy, speed, and scalability
Explanation
The three design goals are state-of-the-art accuracy, state-of-the-art performance (speed), and state-of-the-art scalability.
- A
- 8
What does 'state-of-the-art accuracy' mean in the context of Spark NLP?
- A
The best accuracy achieved on academically accepted benchmarks from peer-reviewed papers
- B
The highest accuracy among all commercial NLP products
- C
The highest accuracy achievable on any dataset without hyperparameter tuning
- D
Accuracy that is guaranteed to improve with each release
Correct answer
AThe best accuracy achieved on academically accepted benchmarks from peer-reviewed papers
Explanation
State-of-the-art accuracy refers to the best accuracy achieved on academically accepted benchmarks from peer-reviewed papers, not just a marketing term.
- A
- 9
What F1 score did Spark NLP achieve on the CoNLL-2003 NER test dataset using BERT Large?
- A
93.3
- B
97.0
- C
91.0
- D
95.9
Correct answer
A93.3
Explanation
Using BERT Large, Spark NLP achieved 93.3 F1 on the test dataset and 95.9 on the dev dataset for CoNLL-2003 NER.
- A
- 10
In the comparison between Spark NLP and spaCy for NER accuracy with default parameters, which statement is true?
- A
spaCy achieves higher accuracy with default parameters
- B
Both achieve identical accuracy on all embeddings
- C
Spark NLP only outperforms spaCy when using BERT embeddings
- D
Spark NLP achieves higher accuracy across different embeddings
Correct answer
DSpark NLP achieves higher accuracy across different embeddings
Explanation
Spark NLP shows very good accuracy from small GloVe embeddings all the way to BERT large, outperforming spaCy's default parameters in the comparison.
- A
- 11
How many word embedding models does Spark NLP provide out of the box?
- A
250
- B
50
- C
90
- D
330
Correct answer
B50
Explanation
Spark NLP comes with 50 word embedding models out of the box. (Note: Later it mentions over 90 word and sentence embeddings for classifiers, but 50 specifically for word embeddings for NER training.)
- A
- 12
What accuracy did Spark NLP achieve for language detection on 22 languages?
- A
99%
- B
93.3%
- C
95.9%
- D
97%
Correct answer
A99%
Explanation
The language detection models reached 99% accuracy for 22 languages and 97% for 32 languages.
- A
- 13
What is the primary purpose of Spark NLP's spell checking model?
- A
To correct grammar mistakes
- B
To improve tokenization accuracy
- C
To handle bad inputs from OCR
- D
To translate text between languages
Correct answer
CTo handle bad inputs from OCR
Explanation
The spell checking model was initially created to handle bad inputs from OCR and can leverage context for corrections.
- A
- 14
What improvement in training speed was achieved when Spark NLP moved to TensorFlow 1.15?
- A
Over 70% faster
- B
50% faster
- C
Over 60% faster
- D
40% faster
Correct answer
COver 60% faster
Explanation
Moving to TensorFlow 1.15 improved the speed of training by over 60% and improved accuracy by 4%.
- A
- 15
How much was memory usage improved for BERT embeddings in the latest release?
- A
70%
- B
50%
- C
40%
- D
30%
Correct answer
D30%
Explanation
The latest release improved memory by 30% and performance by more than 70% with dynamic shapes.
- A
- 16
Compared to BERT-Base, how much smaller and faster is BERT-Tiny?
- A
10 times smaller and 20 times faster
- B
24 times smaller and 28 times faster
- C
30 times smaller and 25 times faster
- D
12 times smaller and 10 times faster
Correct answer
B24 times smaller and 28 times faster
Explanation
BERT-Tiny has only 2 layers and 128 dimensions, making it 24 times smaller and 28 times faster than BERT-Base.
- A
- 17
What performance gain can be achieved by using GPU in Spark NLP for tasks using TensorFlow backend?
- A
Between 40% to 50% faster in both training and prediction
- B
Between 20% to 30% faster
- C
Between 80% to 90% faster
- D
Between 60% to 70% faster
Correct answer
ABetween 40% to 50% faster in both training and prediction
Explanation
Using GPU makes tasks using TensorFlow backend 40% to 50% faster in both training and prediction.
- A
- 18
What was the performance comparison of Intel Cascade Lake (with MKL) vs GPU for French NER training?
- A
Intel Cascade Lake was 19% faster than GPU and up to 46% cheaper
- B
Intel Cascade Lake was 10% slower but cheaper
- C
GPU was 19% faster than Intel Cascade Lake
- D
Both performed equally
Correct answer
AIntel Cascade Lake was 19% faster than GPU and up to 46% cheaper
Explanation
With custom TensorFlow optimized for Intel (MKL), training on Cascade Lake was 19% faster than GPU and up to 46% cheaper.
- A
- 19
What is required to scale a Spark NLP pipeline to a cluster?
- A
Zero code change
- B
Adding configuration files for the cluster manager
- C
Rewriting the pipeline using Spark MLlib
- D
Minor code modifications to specify cluster parameters
Correct answer
AZero code change
Explanation
Spark NLP needs zero code change to scale; it is the only natively distributed open-source NLP library.
- A
- 20
In the scalability benchmark, how many words per second did tokenization achieve on 10 nodes?
- A
7 million
- B
136 thousand
- C
340 thousand
- D
38 thousand
Correct answer
A7 million
Explanation
On a single node, tokenization processed 340,000 words per second; on 10 nodes, it scaled to 7 million words per second.
- A
- 21
In the scalability benchmark, how many words per second did NER achieve on 10 nodes?
- A
38 thousand
- B
500 thousand
- C
136 thousand
- D
340 thousand
Correct answer
C136 thousand
Explanation
NER achieved 38,000 words per second on a single node and increased to 136,000 words per second on 10 nodes.
- A
- 22
What was the word-per-second throughput for BERT Tiny on a 10-node cluster?
- A
170,000
- B
19,000
- C
Approximately 500,000
- D
76,000
Correct answer
CApproximately 500,000
Explanation
BERT Tiny achieved 170,000 words per second on a single node and almost 500,000 on 10 nodes.
- A
- 23
How many pre-trained pipelines does Spark NLP offer out of the box?
- A
Over 50
- B
Over 250
- C
Over 330
- D
Over 90
Correct answer
DOver 90
Explanation
Spark NLP has over 90 pre-trained pipelines supporting up to 13 languages.
- A
- 24
How many pre-trained models does Spark NLP offer out of the box?
- A
Over 90
- B
Over 250
- C
Over 150
- D
Over 330
Correct answer
BOver 250
Explanation
Spark NLP offers over 250 pre-trained models supporting up to 46 languages.
- A
- 25
What is a limitation of pre-trained pipelines in Spark NLP?
- A
They only work online
- B
They are not flexible; you cannot add or remove tasks
- C
They support only English
- D
They require a cluster to run
Correct answer
BThey are not flexible; you cannot add or remove tasks
Explanation
Pre-trained pipelines are not flexible; if there is a task you don't need, you still pay for it computationally, and if you need a task not included, you cannot add it.
- A
- 26
What is required to train your own NER model in Spark NLP?
- A
A dataset in CoNLL 2003 format and a custom embedding
- B
A dataset in CSV format and a GPU
- C
A dataset in JSON format and a pre-trained pipeline
- D
A dataset in CoNLL 2003 format and a choice of over 50 word embedding models
Correct answer
DA dataset in CoNLL 2003 format and a choice of over 50 word embedding models
Explanation
NER training requires a dataset in CoNLL 2003 format and you can choose from over 50 word embedding models.
- A
- 27
What algorithm does Spark NLP use for POS tagging training?
- A
Perceptron approach
- B
Convolutional neural network
- C
Support vector machine
- D
Bi-directional LSTM with CRF
Correct answer
APerceptron approach
Explanation
POS tagging uses the perceptron approach, which is fast and language agnostic.
- A
- 28
How many classes does the multi-class classifier in Spark NLP support?
- A
Up to 200
- B
Up to 100
- C
Up to 10
- D
Up to 50
Correct answer
BUp to 100
Explanation
The multi-class classifier supports up to 100 classes and accepts over 90 word/sentence embedding models.
- A
- 29
In the Google Colab example, how long did it take to train a NER model using BERT with 2 layers and 768 dimensions?
- A
45 minutes
- B
16 minutes
- C
30 minutes
- D
60 minutes
Correct answer
B16 minutes
Explanation
Training a NER model on Google Colab with BERT (2 layers, 768 dimensions) took 16 minutes and achieved 91% micro F1 on dev data.
- A
- 30
What is the total number of pre-trained models and pipelines available in Spark NLP?
- A
Over 90
- B
Over 250
- C
Over 500
- D
Over 330
Correct answer
DOver 330
Explanation
Spark NLP has over 330 pre-trained models and pipelines supporting over 46 languages.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.