























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























































































Question 1. Which linguistic level deals with the study of word formation such as prefixes and suffixes? A) Syntax B) Morphology C) Semantics D) Pragmatics Answer: B Explanation: Morphology is the branch of linguistics that analyzes the structure of words, including roots, prefixes, and suffixes. Question 2. In the Penn Treebank corpus, what does the tag âNNâ represent? A) Proper noun singular B) Noun, singular or mass C) Verb, base form D) Adjective, comparative Answer: B Explanation: âNNâ is the Penn Treebank tag for a noun that is singular or a mass noun. Question 3. Which of the following is the most appropriate regular expression to capture an email address of the form [email protected]? A) \w+@\w+\.\w+ B) [a-z]+[0-9] C) \d{3}-\d{2}-\d{4} D) \s+ Answer: A
Explanation: The pattern \w+@\w+\.\w+ matches one or more word characters, an â@â, domain name, a dot, and a topâlevel domain. Question 4. When performing tokenization, which step should be applied first to ensure caseâinsensitive matching? A) Lemmatization B) Stopâword removal C) Lowercasing D) Stemming Answer: C Explanation: Lowercasing converts all characters to the same case, allowing subsequent steps to treat âAppleâ and âappleâ identically. Question 5. Which stemming algorithm is known for its aggressive reduction of words and is often considered too harsh for English? A) Porter B) Snowball C) Lancaster D) Krovetz Answer: C Explanation: The Lancaster stemmer applies very aggressive rules, often stripping more characters than desired. Question 6. What is the main difference between stemming and lemmatization? A) Stemming uses dictionaries; lemmatization does not. B) Lemmatization returns the base form; stemming only truncates. C) Stemming works on characters; lemmatization works on phonemes.
B) The term is rare across documents. C) The term is a stopâword. D) The term occurs only in the current document. Answer: B Explanation: Inverse Document Frequency is higher for terms that appear in fewer documents, emphasizing rare but potentially discriminative words. Question 10. Which wordâembedding technique explicitly incorporates subâword information? A) Word2Vec CBOW B) GloVe C) FastText D) Latent Semantic Analysis Answer: C Explanation: FastText represents words as a sum of character nâgram vectors, enabling it to handle unseen or morphologically rich words. Question 11. In Word2Vec, what is the primary objective of the Skipâgram model? A) Predict the current word from surrounding context. B) Predict surrounding context words from the current word. C) Reduce dimensionality of the termâdocument matrix. D) Cluster words based on coâoccurrence frequency. Answer: B Explanation: Skipâgram learns embeddings by using a target word to predict its neighboring context words.
Question 12. How is cosine similarity between two embedding vectors computed? A) Dot product divided by the product of their magnitudes. B) Euclidean distance subtracted from 1. C) Sum of absolute differences. D) Ratio of their L1 norms. Answer: A Explanation: Cosine similarity = (A¡B) / (||A|| Ă ||B||), measuring the angle between vectors irrespective of magnitude. Question 13. Which dimensionalityâreduction technique is commonly used to visualize highâdimensional word embeddings in 2âD space? A) PCA B) LDA C) tâSNE D) KâMeans Answer: C Explanation: tâDistributed Stochastic Neighbor Embedding (tâSNE) preserves local structure and is popular for visualizing embeddings. Question 14. What is the main advantage of using a Dependency Parser over a Constituency Parser? A) It generates phraseâstructure trees. B) It directly captures headâdependent relations. C) It requires less annotated data. D) It can only parse English. Answer: B
D) Beginning of a location entity. Answer: B Explanation: âBâPERâ follows the BIO scheme, marking the first token of a personâtype entity. Question 18. Which of the following is a common error type in NER systems? A) Overâstemming of proper nouns. B) Misâclassifying dates as organizations. C) Ignoring stopâwords. D) Tokenizing punctuation as separate words. Answer: B Explanation: NER models sometimes confuse temporal expressions with organization names due to similar lexical cues. Question 19. What problem does the vanishing gradient affect most in standard RNNs? A) Overfitting on training data. B) Inability to learn longârange dependencies. C) Excessive memory usage. D) Slow convergence due to large gradients. Answer: B Explanation: Vanishing gradients cause the error signal to shrink exponentially, preventing the network from learning dependencies over many time steps. Question 20. Which gating mechanism in LSTM controls how much of the previous cell state is retained? A) Input gate B) Forget gate
C) Output gate D) Reset gate Answer: B Explanation: The forget gate decides which information from the prior cell state should be discarded. Question 21. In a GRU cell, which component replaces both the input and forget gates of an LSTM? A) Update gate B) Reset gate C) Candidate activation D) Output gate Answer: A Explanation: The GRUâs update gate determines how much of the previous hidden state is kept, merging the functions of LSTMâs input and forget gates. Question 22. Which type of attention allows each token to attend to all other tokens in the same sequence? A) Causal attention B) Selfâattention C) Crossâattention D) Local attention Answer: B Explanation: Selfâattention computes attention scores among all token pairs within a single sequence. Question 23. In the Transformer architecture, what is the purpose of positional encodings?
Question 26. Which preâtrained model is encoderâonly and designed primarily for masked language modeling? A) GPTâ 2 B) BERT C) T D) TransformerâXL Answer: B Explanation: BERT uses a bidirectional encoder and is trained with a masked language modeling objective. Question 27. Which model architecture follows an encoderâdecoder paradigm and is commonly used for textâtoâtext tasks? A) BERT B) GPTâ 3 C) T D) RoBERTa Answer: C Explanation: T5 (TextâtoâText Transfer Transformer) treats every NLP problem as a text generation task using an encoderâdecoder. Question 28. In transfer learning for NLP, what is the typical first step after loading a preâtrained model? A. Training from scratch on the target dataset. B. Freezing all layers and only training the classifier head. C. Removing the tokenizer. D. Converting the model to a ruleâbased system. Answer: B
Explanation: Fineâtuning usually starts by freezing the majority of the preâtrained layers and training a new taskâspecific head. Question 29. Which fineâtuning strategy is most appropriate when only a few labeled examples are available in a new domain? A) Fullâmodel retraining B) Zeroâshot inference C) Fewâshot prompt engineering D) Data augmentation with synthetic labels Answer: C Explanation: Fewâshot prompt engineering leverages the modelâs inâcontext learning ability with a handful of examples. Question 30. In prompt engineering, what does âzeroâshotâ refer to? A) Providing no examples and only a task description. B) Using a single example. C) Training a new model from scratch. D) Removing all stopâwords from the prompt. Answer: A Explanation: Zeroâshot prompting asks the model to perform a task based solely on the instruction, without demonstrations. Question 31. Which evaluation metric is most suitable for assessing abstractive summarization quality? A) BLEU B) ROUGEâL C) Perplexity
A) Jaccard similarity B) Cosine similarity C) Hamming distance D) Manhattan distance Answer: B Explanation: Cosine similarity efficiently measures angular closeness of highâdimensional dense vectors. Question 35. Which preprocessing step is essential before applying a regular expression that matches dates in the format âDD/MM/YYYYâ? A) Stemming B) Lowercasing C) Removing punctuation D) Normalizing whitespace Answer: D Explanation: Normalizing whitespace ensures consistent spacing, allowing the regex to reliably locate date patterns. Question 36. What is the main purpose of stopâword removal in text classification pipelines? A) To increase vocabulary size. B) To reduce noise and dimensionality. C) To improve tokenization speed. D) To enhance stemming accuracy. Answer: B Explanation: Removing highâfrequency, lowâinformation words reduces feature space and often improves classifier performance.
Question 37. Which of the following best describes the âBIOâ tagging scheme used in sequence labeling? A) Binary Indicator Output B) BeginâInsideâOutside C) BagâofâInstancesâOrdered D) BackwardâInferenceâOptimization Answer: B Explanation: âBIOâ stands for Begin, Inside, Outside, indicating the position of a token within a named entity. Question 38. In the context of word embeddings, what does the term âdistributional hypothesisâ state? A) Words with similar meanings occur in similar contexts. B) All words follow a normal distribution in vector space. C) Embeddings must be normally distributed for training stability. D) Frequency distribution determines embedding dimensionality. Answer: A Explanation: The distributional hypothesis posits that semantic similarity can be inferred from contextual coâoccurrence patterns. Question 39. Which algorithm can be used to automatically learn the optimal number of topics in a corpus? A) Kâmeans clustering B) Latent Dirichlet Allocation with hierarchical Dirichlet process C) Principal Component Analysis D) NaĂŻve Bayes classifier
C) Multiâhead attention D) Crossâattention Answer: B Explanation: Causal (or masked) attention prevents a token from attending to future positions, ensuring autoregressive generation. Question 43. Which loss function is typically used for training a binary classification head on top of BERT for sentiment analysis? A) Categorical crossâentropy B) Binary crossâentropy C) Hinge loss D) Mean squared error Answer: B Explanation: Binary crossâentropy measures the error for twoâclass problems and is standard for sigmoidâbased classifiers. Question 44. What is the main benefit of using subâword tokenization (e.g., WordPiece) in transformer models? A) Reduces model depth. B) Handles outâofâvocabulary words efficiently. C) Guarantees grammatical correctness. D) Eliminates the need for positional encodings. Answer: B Explanation: Subâword tokenizers break rare words into known pieces, allowing the model to represent unseen words. Question 45. Which of the following best describes âdomain adaptationâ in NLP?
A) Translating text from one language to another. B) Fineâtuning a model on data from a specific industry to improve performance there. C) Converting a ruleâbased system into a neural one. D) Reducing model size for mobile deployment. Answer: B Explanation: Domain adaptation tailors a preâtrained model to a target domain (e.g., medical) using domainâspecific data. Question 46. In a language model, what does a high perplexity score indicate? A) The model predicts the test set well. B) The model is overfitting. C) The model struggles to predict the data. D) The model has too many parameters. Answer: C Explanation: Higher perplexity means the model assigns lower probability to the actual tokens, indicating poorer predictive ability. Question 47. Which technique can mitigate the âcatastrophic forgettingâ problem when fineâtuning LLMs on new tasks? A) Gradient clipping B) Elastic weight consolidation C) Dropout regularization D) Learning rate decay Answer: B Explanation: Elastic weight consolidation penalizes changes to important weights, preserving knowledge from the original task.
Answer: B Explanation: Large parameter counts lead to computationally intensive inference, causing latency issues in realâtime applications. Question 51. Which embedding evaluation technique measures how well vectors capture analogical relationships (e.g., king â man + woman â queen)? A) Cosine similarity on word pairs B) Word intrusion test C) Word analogy task D) Nearest neighbor classification Answer: C Explanation: The word analogy task evaluates embeddings on solving proportional relationships using vector arithmetic. Question 52. What is the primary purpose of âmaskingâ in BERTâs preâtraining objective? A) To reduce vocabulary size. B) To force the model to predict missing words from context. C) To prevent overfitting on the training data. D) To enable sequenceâtoâsequence translation. Answer: B Explanation: Masked language modeling hides random tokens, requiring BERT to infer them using bidirectional context. Question 53. Which of the following best describes âfewâshot promptingâ with GPTâ3? A) Providing a large labeled dataset for fineâtuning. B) Supplying a short description and a few examples within the prompt.
C) Training the model from scratch on a new language. D) Removing all punctuation from the input. Answer: B Explanation: Fewâshot prompting includes a task description plus a handful of inputâoutput examples to guide generation. Question 54. In the context of tokenization, what does âbyteâpair encoding (BPE)â aim to achieve? A) Compress the text size for storage. B) Learn a set of subâword units based on frequency of character pair merges. C) Encode tokens as fixedâlength binary strings. D) Remove all vowels from words. Answer: B Explanation: BPE iteratively merges the most frequent adjacent character pairs, creating a subâword vocabulary. Question 55. Which loss function is commonly used when training a model for nextâsentence prediction (NSP) in BERT? A) Binary crossâentropy B) Categorical crossâentropy C) Hinge loss D) Mean absolute error Answer: A Explanation: NSP is a binary classification task (whether two sentences follow each other), so binary crossâentropy is applied. Question 56. What does the term âgradient clippingâ refer to in training deep NLP models?