1. Home
  2. Explore
  3. Computer Science
  4. Spark NLP Overview

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Spark NLP Overview

  • 30Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Library Overview

Under which license is Spark NLP released?

30 questions

  1. 1

    Under which license is Spark NLP released?

    1. A

      GPL 3.0

    2. B

      Apache 2.0

    3. C

      BSD 3-Clause

    4. D

      MIT

    Correct answer
    B

    Apache 2.0

    Explanation

    Spark NLP is released under the Apache 2.0 license, making it free for both personal and commercial use.

  2. 2

    Which programming languages does Spark NLP support?

    1. A

      Python, Java, and Scala only

    2. B

      Python, Java, Scala, and some R bindings

    3. C

      Python, Java, Scala, and R bindings

    4. D

      Python, Java, Scala, and .NET bindings

    Correct answer
    B

    Python, Java, Scala, and some R bindings

    Explanation

    Spark NLP supports Python, Java, Scala, and also some R bindings.

  3. 3

    What is the relationship between Spark NLP pipelines and Spark ML pipelines?

    1. A

      Spark ML pipelines can be converted to Spark NLP pipelines

    2. B

      Every Spark NLP pipeline is a Spark ML pipeline as well

    3. C

      Spark NLP pipelines are built on top of Spark MLlib

    4. D

      Spark NLP pipelines are independent of Spark ML pipelines

    Correct answer
    B

    Every 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.

  4. 4

    According to the O'Reilly surveys, how is Spark NLP positioned among enterprise NLP libraries?

    1. A

      It is the most widely used NLP library by practitioners in the enterprise

    2. B

      It is the second most widely used NLP library

    3. C

      It is the most accurate but least used library

    4. D

      It is the leading open-source library for research

    Correct answer
    A

    It 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.

  5. 5

    What is one of the main reasons Spark NLP was designed to handle the entire NLP pipeline?

    1. A

      To enable offline processing without internet access

    2. B

      To support more programming languages than other libraries

    3. C

      To reduce the number of required software dependencies

    4. D

      To avoid unnecessary copying of data and moving data between libraries

    Correct answer
    D

    To 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.

  6. 6

    In which industries is Spark NLP heavily used?

    1. A

      Education, entertainment, and social media

    2. B

      Energy, transportation, and agriculture

    3. C

      Retail, manufacturing, and logistics

    4. D

      Healthcare, finance, and insurance

    Correct answer
    D

    Healthcare, finance, and insurance

    Explanation

    Spark NLP is heavily used in healthcare, life sciences, finance, and insurance, which are high-compliance industries.

  7. 7

    What are the three basic design goals of Spark NLP?

    1. A

      State-of-the-art accuracy, speed, and scalability

    2. B

      Low memory usage, high throughput, and multi-language support

    3. C

      Ease of use, documentation, and community support

    4. D

      Open-source, free, and cross-platform compatibility

    Correct answer
    A

    State-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.

  8. 8

    What does 'state-of-the-art accuracy' mean in the context of Spark NLP?

    1. A

      The best accuracy achieved on academically accepted benchmarks from peer-reviewed papers

    2. B

      The highest accuracy among all commercial NLP products

    3. C

      The highest accuracy achievable on any dataset without hyperparameter tuning

    4. D

      Accuracy that is guaranteed to improve with each release

    Correct answer
    A

    The 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.

  9. 9

    What F1 score did Spark NLP achieve on the CoNLL-2003 NER test dataset using BERT Large?

    1. A

      93.3

    2. B

      97.0

    3. C

      91.0

    4. D

      95.9

    Correct answer
    A

    93.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.

  10. 10

    In the comparison between Spark NLP and spaCy for NER accuracy with default parameters, which statement is true?

    1. A

      spaCy achieves higher accuracy with default parameters

    2. B

      Both achieve identical accuracy on all embeddings

    3. C

      Spark NLP only outperforms spaCy when using BERT embeddings

    4. D

      Spark NLP achieves higher accuracy across different embeddings

    Correct answer
    D

    Spark 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.

  11. 11

    How many word embedding models does Spark NLP provide out of the box?

    1. A

      250

    2. B

      50

    3. C

      90

    4. D

      330

    Correct answer
    B

    50

    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.)

  12. 12

    What accuracy did Spark NLP achieve for language detection on 22 languages?

    1. A

      99%

    2. B

      93.3%

    3. C

      95.9%

    4. D

      97%

    Correct answer
    A

    99%

    Explanation

    The language detection models reached 99% accuracy for 22 languages and 97% for 32 languages.

  13. 13

    What is the primary purpose of Spark NLP's spell checking model?

    1. A

      To correct grammar mistakes

    2. B

      To improve tokenization accuracy

    3. C

      To handle bad inputs from OCR

    4. D

      To translate text between languages

    Correct answer
    C

    To 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.

  14. 14

    What improvement in training speed was achieved when Spark NLP moved to TensorFlow 1.15?

    1. A

      Over 70% faster

    2. B

      50% faster

    3. C

      Over 60% faster

    4. D

      40% faster

    Correct answer
    C

    Over 60% faster

    Explanation

    Moving to TensorFlow 1.15 improved the speed of training by over 60% and improved accuracy by 4%.

  15. 15

    How much was memory usage improved for BERT embeddings in the latest release?

    1. A

      70%

    2. B

      50%

    3. C

      40%

    4. D

      30%

    Correct answer
    D

    30%

    Explanation

    The latest release improved memory by 30% and performance by more than 70% with dynamic shapes.

  16. 16

    Compared to BERT-Base, how much smaller and faster is BERT-Tiny?

    1. A

      10 times smaller and 20 times faster

    2. B

      24 times smaller and 28 times faster

    3. C

      30 times smaller and 25 times faster

    4. D

      12 times smaller and 10 times faster

    Correct answer
    B

    24 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.

  17. 17

    What performance gain can be achieved by using GPU in Spark NLP for tasks using TensorFlow backend?

    1. A

      Between 40% to 50% faster in both training and prediction

    2. B

      Between 20% to 30% faster

    3. C

      Between 80% to 90% faster

    4. D

      Between 60% to 70% faster

    Correct answer
    A

    Between 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.

  18. 18

    What was the performance comparison of Intel Cascade Lake (with MKL) vs GPU for French NER training?

    1. A

      Intel Cascade Lake was 19% faster than GPU and up to 46% cheaper

    2. B

      Intel Cascade Lake was 10% slower but cheaper

    3. C

      GPU was 19% faster than Intel Cascade Lake

    4. D

      Both performed equally

    Correct answer
    A

    Intel 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.

  19. 19

    What is required to scale a Spark NLP pipeline to a cluster?

    1. A

      Zero code change

    2. B

      Adding configuration files for the cluster manager

    3. C

      Rewriting the pipeline using Spark MLlib

    4. D

      Minor code modifications to specify cluster parameters

    Correct answer
    A

    Zero code change

    Explanation

    Spark NLP needs zero code change to scale; it is the only natively distributed open-source NLP library.

  20. 20

    In the scalability benchmark, how many words per second did tokenization achieve on 10 nodes?

    1. A

      7 million

    2. B

      136 thousand

    3. C

      340 thousand

    4. D

      38 thousand

    Correct answer
    A

    7 million

    Explanation

    On a single node, tokenization processed 340,000 words per second; on 10 nodes, it scaled to 7 million words per second.

  21. 21

    In the scalability benchmark, how many words per second did NER achieve on 10 nodes?

    1. A

      38 thousand

    2. B

      500 thousand

    3. C

      136 thousand

    4. D

      340 thousand

    Correct answer
    C

    136 thousand

    Explanation

    NER achieved 38,000 words per second on a single node and increased to 136,000 words per second on 10 nodes.

  22. 22

    What was the word-per-second throughput for BERT Tiny on a 10-node cluster?

    1. A

      170,000

    2. B

      19,000

    3. C

      Approximately 500,000

    4. D

      76,000

    Correct answer
    C

    Approximately 500,000

    Explanation

    BERT Tiny achieved 170,000 words per second on a single node and almost 500,000 on 10 nodes.

  23. 23

    How many pre-trained pipelines does Spark NLP offer out of the box?

    1. A

      Over 50

    2. B

      Over 250

    3. C

      Over 330

    4. D

      Over 90

    Correct answer
    D

    Over 90

    Explanation

    Spark NLP has over 90 pre-trained pipelines supporting up to 13 languages.

  24. 24

    How many pre-trained models does Spark NLP offer out of the box?

    1. A

      Over 90

    2. B

      Over 250

    3. C

      Over 150

    4. D

      Over 330

    Correct answer
    B

    Over 250

    Explanation

    Spark NLP offers over 250 pre-trained models supporting up to 46 languages.

  25. 25

    What is a limitation of pre-trained pipelines in Spark NLP?

    1. A

      They only work online

    2. B

      They are not flexible; you cannot add or remove tasks

    3. C

      They support only English

    4. D

      They require a cluster to run

    Correct answer
    B

    They 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.

  26. 26

    What is required to train your own NER model in Spark NLP?

    1. A

      A dataset in CoNLL 2003 format and a custom embedding

    2. B

      A dataset in CSV format and a GPU

    3. C

      A dataset in JSON format and a pre-trained pipeline

    4. D

      A dataset in CoNLL 2003 format and a choice of over 50 word embedding models

    Correct answer
    D

    A 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.

  27. 27

    What algorithm does Spark NLP use for POS tagging training?

    1. A

      Perceptron approach

    2. B

      Convolutional neural network

    3. C

      Support vector machine

    4. D

      Bi-directional LSTM with CRF

    Correct answer
    A

    Perceptron approach

    Explanation

    POS tagging uses the perceptron approach, which is fast and language agnostic.

  28. 28

    How many classes does the multi-class classifier in Spark NLP support?

    1. A

      Up to 200

    2. B

      Up to 100

    3. C

      Up to 10

    4. D

      Up to 50

    Correct answer
    B

    Up to 100

    Explanation

    The multi-class classifier supports up to 100 classes and accepts over 90 word/sentence embedding models.

  29. 29

    In the Google Colab example, how long did it take to train a NER model using BERT with 2 layers and 768 dimensions?

    1. A

      45 minutes

    2. B

      16 minutes

    3. C

      30 minutes

    4. D

      60 minutes

    Correct answer
    B

    16 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.

  30. 30

    What is the total number of pre-trained models and pipelines available in Spark NLP?

    1. A

      Over 90

    2. B

      Over 250

    3. C

      Over 500

    4. D

      Over 330

    Correct answer
    D

    Over 330

    Explanation

    Spark NLP has over 330 pre-trained models and pipelines supporting over 46 languages.

Question 1 of 30
Question 1 of 30

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent