#1
In Python, what does the 'split' function do when applied to a string?
Splits a string into a list of substrings based on a delimiter
ExplanationThe 'split' function in Python divides a string into substrings based on a specified delimiter.
#2
What does the acronym NLP stand for in the context of text processing?
Natural Language Processing
ExplanationNLP stands for Natural Language Processing in text processing.
#3
What does the acronym POS stand for in the context of natural language processing?
Part of Speech
ExplanationPOS stands for Part of Speech in the context of natural language processing.
#4
In the context of text processing, what does the term 'corpus' refer to?
A collection of documents or texts
ExplanationA 'corpus' refers to a collection of documents or texts in text processing.
#5
What is the purpose of the 'replace' method in string manipulation?
Removing specified characters from a string
ExplanationThe 'replace' method in string manipulation removes specified characters from a string.
#6
What is the primary purpose of regular expressions in text processing?
To perform complex searches and manipulations on text
ExplanationRegular expressions are used for complex text searches and manipulations.
#7
Which of the following is a common method for tokenization in natural language processing?
Regular expressions
ExplanationRegular expressions are commonly used for tokenization in NLP.
#8
Which of the following is a common use case for named entity recognition (NER) in text processing?
Extracting dates, locations, and names from text
ExplanationNER is commonly used for extracting dates, locations, and names from text in text processing.
#9
In the context of regular expressions, what does the '.*' pattern represent?
Zero or more occurrences of any character
ExplanationThe '.*' pattern in regular expressions matches zero or more occurrences of any character.
#10
Which of the following is a common technique for feature extraction in text processing?
TF-IDF weighting
ExplanationTF-IDF weighting is a common technique for feature extraction in text processing.
#11
In regular expressions, what does the '^' symbol indicate?
Start of a line
ExplanationThe '^' symbol in regular expressions marks the start of a line.
#12
Which of the following is a common method for feature scaling in text data?
Normalization
ExplanationNormalization is a common method for feature scaling in text data.
#13
In regular expressions, what does the '?' symbol represent?
Zero or one occurrence of the preceding character
ExplanationThe '?' symbol in regular expressions indicates zero or one occurrence of the preceding character.
#14
Which of the following is a common method for handling imbalanced datasets in text classification?
Data augmentation
ExplanationData augmentation is commonly used for handling imbalanced datasets in text classification.
#15
In regular expressions, what does the '{n,m}' notation represent?
One or more occurrences of the preceding character
ExplanationThe '{n,m}' notation in regular expressions represents one or more occurrences of the preceding character.
#16
What is the purpose of stemming in text processing?
To reduce words to their base or root form
ExplanationStemming aims to reduce words to their base or root form in text processing.
#17
Which of the following is a common method for removing stop words in text processing?
TF-IDF weighting
ExplanationTF-IDF weighting is a common technique for removing stop words in text processing.
#18
What is the purpose of the 'join' method in string manipulation?
Joining elements of a list into a single string
ExplanationThe 'join' method in string manipulation merges elements of a list into a single string.
#19
Which of the following is a common technique for sentiment analysis in text processing?
Bag of words
ExplanationThe Bag of Words technique is commonly used for sentiment analysis in text processing.
#20
What is the purpose of lemmatization in text processing?
To reduce words to their base or root form
ExplanationLemmatization aims to reduce words to their base or root form in text processing.
#21
Which of the following is a common method for calculating the similarity between two texts?
Levenshtein distance
ExplanationLevenshtein distance is a common method for measuring text similarity.
#22
What is the purpose of the 'find' method in string manipulation?
Locating the index of a substring
ExplanationThe 'find' method in string manipulation is used for locating the index of a substring.
#23
Which of the following is a common method for document similarity calculation in text processing?
Cosine similarity
ExplanationCosine similarity is a common method for calculating document similarity in text processing.
#24
What is the purpose of the 'NLTK' library in Python for text processing?
Natural Language Toolkit for Tokenization
ExplanationNLTK (Natural Language Toolkit) is used in Python for various text processing tasks including tokenization.
#25
Which algorithm is commonly used for topic modeling in text processing?
Latent Dirichlet Allocation (LDA)
ExplanationLatent Dirichlet Allocation (LDA) is commonly used for topic modeling in text processing.