Single Choice Easy

Q

 a) Download the dataset from https://hrcdn.net/s3_pub/istreet-assets/H4_TQkbOj39HUNoBukluIQ/training.txt  and load it to the variable 'sentiment_analysis_data'.
 b) Give the column names as 'label' and 'message'.
 c) Try out the code snippets and answer the questions.
What command should be given to tokenize a sentence into words?

ID: #5571 Unstructured Data Classification 214 views
Question Info
#5571Q ID
EasyDifficulty
Unstructured Data ClassificationTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A from nltk import sentence_tokenize, Word_tokens =sentence_tokenize(sentence)
  • B from nltk.tokenizer import word_tokenizer, Word_tokens =word_tokenizer(sentence)
  • C from nltk import tokenize_words, Word_tokens =tokenize_words(sentence)
  • D from nltk.tokenize import word_tokenize, Word_tokens =word_tokenize(sentence)
Correct Answer

Explanation

from nltk.tokenize import word_tokenize, Word_tokens =word_tokenize(sentence)

Share This Question

Challenge a friend or share with your study group.