Code icon

The App is Under a Quick Maintenance

We apologize for the inconvenience. Please come back later

Menu iconMenu iconNatural Language Processing with Python Updated Edition
Natural Language Processing with Python Updated Edition

Quiz Part I: Foundations of NLP

Code Implementation

  1. Which of the following is the correct way to initialize a CountVectorizer in Python?
    a) vectorizer = CountVectorizer(input='data')
    b) vectorizer = CountVectorizer()
    c) vectorizer = CountVectorizer(mode='text')
    d) vectorizer = CountVectorizer(transform=True)
  2. Which method is used to obtain the most similar words to a given word using a GloVe model in Gensim?

    a) model.get_similar()

    b) model.similarity()

    c) model.most_similar()

    d) model.find_similar()

Code Implementation

  1. Which of the following is the correct way to initialize a CountVectorizer in Python?
    a) vectorizer = CountVectorizer(input='data')
    b) vectorizer = CountVectorizer()
    c) vectorizer = CountVectorizer(mode='text')
    d) vectorizer = CountVectorizer(transform=True)
  2. Which method is used to obtain the most similar words to a given word using a GloVe model in Gensim?

    a) model.get_similar()

    b) model.similarity()

    c) model.most_similar()

    d) model.find_similar()

Code Implementation

  1. Which of the following is the correct way to initialize a CountVectorizer in Python?
    a) vectorizer = CountVectorizer(input='data')
    b) vectorizer = CountVectorizer()
    c) vectorizer = CountVectorizer(mode='text')
    d) vectorizer = CountVectorizer(transform=True)
  2. Which method is used to obtain the most similar words to a given word using a GloVe model in Gensim?

    a) model.get_similar()

    b) model.similarity()

    c) model.most_similar()

    d) model.find_similar()

Code Implementation

  1. Which of the following is the correct way to initialize a CountVectorizer in Python?
    a) vectorizer = CountVectorizer(input='data')
    b) vectorizer = CountVectorizer()
    c) vectorizer = CountVectorizer(mode='text')
    d) vectorizer = CountVectorizer(transform=True)
  2. Which method is used to obtain the most similar words to a given word using a GloVe model in Gensim?

    a) model.get_similar()

    b) model.similarity()

    c) model.most_similar()

    d) model.find_similar()