1. Home
  2. Explore
  3. Computer Science
  4. Natural Language Processing with spaCy

Study methods

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

Natural Language Processing with spaCy

  • 36Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: NLP Fundamentals
Natural Language Processing is the process by which we try to get a computer system to understand, parse, and extract human language, often from
.

36 questions

  1. 1
    Natural Language Processing is the process by which we try to get a computer system to understand, parse, and extract human language, often from
    _____
    .
    Hint

    Think about the typical form of data that humans generate in language.

    Answer

    raw text

  2. 2
    The area of NLP that involves identifying people, organizations, and locations in text is called
    _____
    .
    Hint

    This task focuses on finding proper nouns and classifying them.

    Answer

    named entity recognition

  3. 3
    Part-of-speech tagging, syntactic parsing, text categorization, coreference resolution, and machine translation are all areas of
    _____
    .
    Hint

    These are subfields of computational linguistics that deal with processing human language.

    Answer

    NLP

  4. 4
    Natural Language Understanding (NLU) is a field adjacent to NLP that focuses on tasks like relation extraction, semantic parsing, question answering, summarization, sentiment analysis, and
    _____
    .
    Hint

    This task involves rephrasing a sentence while preserving meaning.

    Answer

    paraphrasing

  5. 5
    Information extraction is the process by which we get a computer system to extract relevant information from unstructured data and produce
    _____
    .
    Hint

    Think of the opposite of unstructured data, like a database or metadata.

    Answer

    structured data

  6. 6
    Spam detection is an example of
    _____
    .
    Hint

    This task assigns a label (e.g., spam or not spam) to a text.

    Answer

    text categorization

  7. 7
    The process of reading in data and classifying it into categories is known as
    _____
    .
    Hint

    Also called text classification, this is a common NLP task.

    Answer

    text categorization

  8. 8
    spaCy is a framework for doing NLP, and as of 2021 it is primarily available in
    _____
    .
    Hint

    This is a popular programming language for data science and machine learning.

    Answer

    Python

  9. 9
    spaCy was designed by
    _____
    .
    Hint

    The company behind spaCy focuses on AI at scale.

    Answer

    explosion AI

  10. 10
    One reason spaCy is preferred over other frameworks is that it provides off-the-shelf models that benchmark very well in terms of speed and accuracy metrics such as precision, recall, and
    _____
    .
    Hint

    This metric is the harmonic mean of precision and recall.

    Answer

    F-score

  11. 11
    spaCy can leverage current natural language processing methods, specifically
    _____
    models.
    Hint

    These models, like BERT, have revolutionized NLP in recent years.

    Answer

    transformer

  12. 12
    spaCy provides the framework for doing
    _____
    relatively easily compared to other NLP frameworks.
    Hint

    This allows you to adapt models to your own specific tasks.

    Answer

    custom training

  13. 13
    spaCy scales well because it can process hundreds of thousands of documents with relative ease, especially when using
    _____
    .
    Hint

    These are deterministic components that do not require machine learning.

    Answer

    rules-based pipes

  14. 14
    To install spaCy using pip, you run the command
    _____
    .
    Hint

    This is the standard pip command to install a package.

    Answer

    pip install spacy

  15. 15
    To download the English small model for spaCy, you use the terminal command python -m spacy download
    _____
    .
    Hint

    The model name indicates English, core, web, and small size.

    Answer

    en_core_web_sm

  16. 16
    After installing spaCy, you import it with the statement
    _____
    .
    Hint

    This is how you bring the library into your Python script.

    Answer

    import spacy

  17. 17
    To create an NLP object for the English model, you use the command nlp =
    _____
    .
    Hint

    This function loads a trained pipeline from disk.

    Answer

    spacy.load("en_core_web_sm")

  18. 18
    The instructor recommends selecting
    _____
    instead of GPU for installation to avoid additional complexity like CUDA.
    Hint

    Most computers have this by default; it requires no extra setup.

    Answer

    CPU

  19. 19
    To verify that the model was downloaded correctly, you can create an NLP object and then create a
    _____
    object by passing text to it.
    Hint

    This object is the central container in spaCy that holds all annotations.

    Answer

    doc

  20. 20
    Containers in spaCy are objects that contain a large quantity of
    _____
    about a text.
    Hint

    They hold annotations like tokens, entities, and sentences.

    Answer

    data

  21. 21
    The three main containers in spaCy that are used repeatedly are the doc, span, and
    _____
    .
    Hint

    This is the smallest unit in a text, often a word or punctuation.

    Answer

    token

  22. 22
    The
    _____
    object is the central container around which all of spaCy sits.
    Hint

    It is created by processing a text with the nlp pipeline.

    Answer

    doc

  23. 23
    To access the sentences within a doc object, you iterate over doc.
    _____
    .
    Hint

    This attribute is a generator that yields Span objects for each sentence.

    Answer

    sents

  24. 24
    A
    _____
    is a word or punctuation mark within a sentence that has a self-contained important value, either syntactically or semantically.
    Hint

    These are the individual pieces that make up a sentence after tokenization.

    Answer

    token

  25. 25
    A
    _____
    is a sequence of one or more tokens that forms a meaningful unit.
    Hint

    It can be a single token or multiple tokens, such as a named entity.

    Answer

    span

  26. 26
    An example of a multi-token span is the name
    _____
    .
    Hint

    This is a proper name consisting of three tokens.

    Answer

    Martin Luther King

  27. 27
    The doc object is created by calling the nlp object on a
    _____
    of text.
    Hint

    This is the Python data type for text.

    Answer

    string

  28. 28
    The course is divided into three parts, with part one covering
    _____
    .
    Hint

    These are pre-trained models that come with spaCy.

    Answer

    off-the-shelf models

  29. 29
    In part two of the course, you will learn how to use rules-based pipes like the entity ruler, matcher, and custom components that don't exist in
    _____
    .
    Hint

    These are components you create yourself to handle domain-specific problems.

    Answer

    off-the-shelf models

  30. 30
    Part three of the course applies spaCy to information extraction from
    _____
    .
    Hint

    This domain includes stocks, markets, indexes, and stock exchanges.

    Answer

    financial documents

  31. 31
    The instructor recommends a three-pass approach: first watch the entire video, then code along, and finally try to do it on your own without
    _____
    .
    Hint

    This involves relying only on memory and understanding.

    Answer

    looking at the textbook or the video

  32. 32
    The companion textbook for the course is located at
    _____
    .
    Hint

    This website provides additional written material that complements the video.

    Answer

    spacy.pythonhumanities.com

  33. 33
    NLP is used in industries such as finance, law, and
    _____
    .
    Hint

    Researchers use NLP for information extraction from texts.

    Answer

    academia

  34. 34
    In the legal industry, NLP is used to classify documents and extract keywords to reduce millions of documents to a
    _____
    that lawyers read verbatim.
    Hint

    The goal is to drastically reduce the number of documents needed for close reading.

    Answer

    handful

  35. 35
    A financial analyst might use NLP to extract company names, stocks, and indexes from news articles, which is an example of
    _____
    .
    Hint

    This task structures unstructured data into useful metadata.

    Answer

    information extraction

  36. 36
    Spam detection is a real-world application of
    _____
    that has been nearly perfect for decades.
    Hint

    It assigns a label ('spam' or 'not spam') to emails.

    Answer

    text categorization

1 of 36
Question 1 of 36

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent