WorksheetsNatural Language Processing Quiz
Total questions: 109
Worksheet time: 55mins
Define the main focus of Natural Language Processing.
Image recognition
Signal processing
Interaction between computers and human language
Circuit design
Describe the two broad categories of NLP.
Symbolic and Analog
Rule-based and Statistical
Linear and Nonlinear
Sequential and Parallel
Identify which component deals with sentence meaning.
Syntax
Semantics
Morphology
Phonology
Classify the applications of NLP.
Data mining, Sorting
Machine translation, Chatbots, Sentiment analysis
Hardware optimization, Storage
Circuit evaluation, Compiling
Examine which is a subfield of NLP.
Compiler design
Information Retrieval
Operating systems
Database indexing
Locate the earliest milestone in NLP history.
Google Translate
ELIZA (1966)
Siri
Alexa
Recall the first stage of NLP pipeline.
Lexical analysis
Syntax analysis
Semantic analysis
Pragmatics
Enumerate challenges of NLP.
Ambiguity, Context, Sarcasm
Sorting, Searching, Indexing
Multiplication, Addition
Compiling, Linking
Identify the stage that checks grammar.
Lexical analysis
Syntax analysis
Pragmatics
Information retrieval
Distinguish between syntactic and semantic analysis.
Syntax deals with meaning, semantics with structure
Syntax deals with structure, semantics with meaning
Both deal with phonetics
Both are about speech recognition
Classify the biggest challenge in NLP.
Large memory
Ambiguity
Parallel computation
Indexing speed
Explain the role of pragmatics.
Meaning of individual words
Meaning in context of conversation
Sound recognition
Data mining
Define regular expression.
Random text
A sequence of characters defining a search pattern
Binary search tree
Language compiler
Identify which symbol matches zero or more repetitions.
+
?
*
^
Match the symbol with its use: “^”.
End of string
Any digit
Whitespace
Start of string
Recall the regex for matching digits.
[a-z]
\s
\d
\w
Compare greedy vs non-greedy matching.
Greedy takes longest match, non-greedy shortest match
Both take same length
Greedy is faster
Non-greedy ignores regex rules
Examine practical use of regex.
Compiler optimization
Email validation
Machine learning training
File compression
Define text normalization.
Transforming text into standard format
Compressing text
Encrypting text
Tokenizing text
Identify which is not part of normalization.
Encryption
Lowercasing
Removing punctuation
Expanding contractions
Describe stemming.
Removing suffixes/prefixes to reach root form
Converting to lowercase
Adding tokens
Encoding
Distinguish stemming from lemmatization.
Both return random roots
Lemmatization uses dictionary, stemming cuts off suffixes
Lemmatization is faster
Stemming uses POS tags
Recall the step applied before tokenization.
Parsing
Cleaning text (punctuation removal, lowercasing)
Compiling
POS tagging
Explain why normalization is necessary.
To make text encrypted
To reduce file size
To make text consistent for processing
To identify stopwords only
Define minimum edit distance.
Number of operations to convert one word into another
Number of sentences in a paragraph
Steps in parsing
Syllables in speech
Identify the three operations in edit distance.
Merge, Delete, Sort
Insert, Delete, Substitute
Copy, Replace, Divide
Tokenize, Encode, Decode
Recall the edit distance between “kitten” and “sitting”.
2
3
4
1
Describe the algorithm commonly used.
Merge Sort
Quick Sort
Dynamic Programming (Wagner-Fischer)
BFS
Distinguish Levenshtein distance from Hamming distance.
Both require equal length strings
Hamming is for equal-length strings only, Levenshtein allows different lengths
Levenshtein is faster
Hamming allows insertions
Explain application of edit distance.
POS tagging
Parsing
Spell correction
Tokenization
Define an n-gram.
Random set of n tokens
Sequence of n words
Sequence of n characters
Sentence structure
Identify bigram model.
Probability of word given previous word
Probability of sentence length
Word embedding method
Grammar parser
Recall unigram model assumption.
Words occur independently
Words depend on previous two words
Words are random noise
Word order is preserved
Compare trigram vs bigram.
Trigram considers two previous words, bigram one
Trigram is faster
Both ignore history
Bigram uses three words
Examine main problem of n-grams.
Tokenization
Data sparsity
Large vocabulary
Lowercasing
Classify the type of model n-grams belong to.
Neural models
Statistical models
Rule-based models
Machine translation
Identify the main evaluation metric.
Perplexity
Accuracy
Recall
BLEU
Describe held-out test data.
Data used for training
Data kept aside for evaluation
Validation set
Augmented data
Recall the purpose of cross-validation.
Reduce vocabulary size
Ensure generalization
Improve syntax
Normalize text
Distinguish intrinsic vs extrinsic evaluation.
Intrinsic: direct measure of model; Extrinsic: task-based
Both are task-based
Intrinsic uses BLEU
Extrinsic ignores accuracy
Explain why log probability is used.
To speed up compilation
To avoid underflow and simplify multiplication
To reduce grammar rules
To create embeddings
Examine application of BLEU score.
Sentiment analysis
Machine translation
Speech tagging
Syntax checking
Identify the problem of zeros in n-grams.
Negative probabilities
Unseen events get probability zero
Overflow in computation
Division by zero
Recall why generalization is needed.
To reduce file size
To avoid ambiguity
To assign probabilities to unseen words/sequences
To improve tokenization
Compare open vs closed vocabulary.
Both handle infinite words
Closed has fixed vocabulary, open allows unseen words
Open ignores OOV
Closed allows infinite
Describe the solution for unseen words.
Drop them
Introduce unknown (UNK) token
Ignore them
Encode them
Distinguish OOV problem from ambiguity.
OOV: unseen word; Ambiguity: multiple meanings
Both are same
OOV deals with multiple senses
Ambiguity deals with spelling errors
Explain why zero probabilities are harmful.
They improve speed
They make sentence probability zero
They reduce perplexity
They simplify models
Define smoothing.
Technique to handle zero probabilities
Removing stopwords
Lowercasing text
Tokenizing text
Identify a simple smoothing method.
Add-one (Laplace) smoothing
Regex
POS tagging
Parsing
Compare Laplace vs Good-Turing.
Both same
Good-Turing estimates probability of unseen events better
Laplace is advanced
Good-Turing ignores unseen events
Recall the problem with add-one smoothing.
Too fast
Overestimates unseen events
Ignores seen events
Reduces vocabulary
Describe backoff smoothing.
Uses lower-order n-grams when higher-order is unavailable
Ignores unseen words
Only uses unigrams
Normalizes text
Distinguish interpolation from backoff.
Both drop higher n-grams
Interpolation combines probabilities; Backoff falls back
Both are same
Backoff is faster
Define perplexity.
Random guessing
Measure of how well a model
Define perplexity.
Random guessing
Measure of how well a model predicts test data
Grammar rule
Probability of sentence length
Identify relation between perplexity and entropy.
Perplexity = 2^(Entropy)
Entropy = Perplexity²
Both are unrelated
Perplexity = Entropy/2
Recall lower perplexity means.
Worse model
Better predictive model
Random model
No effect
Explain entropy in NLP.
Word embeddings
Average information content per word
Tokenization
Syntax rule
Distinguish perplexity from accuracy.
Accuracy is probabilistic, perplexity is binary
Accuracy measures correctness, perplexity measures uncertainty
Both same
Perplexity uses F1-score
Describe why perplexity is exponential.
To simplify
Because it is derived from entropy measured in bits
To normalize data
To reduce vocabulary
Define morphology in NLP.
Syntax analysis
Study of word structure and formation
Sentence meaning
Pragmatics
Identify the smallest unit of meaning.
Phoneme
Morpheme
Grapheme
Token
Classify “unhappiness” into morphemes.
un + happy + ness
unhappy + ness
un + happiness
happiness
Distinguish inflectional morphemes from derivational.
Both change meaning
Inflection changes tense/number; derivation changes category/meaning
Derivational changes tense only
Inflectional creates new words
Describe the type of morphology in English.
Agglutinative
Inflectional
Polysynthetic
Isolating
Recall example of an inflectional suffix.
un-
-ed
re-
mis-
Identify the word class of “quickly”.
Adjective
Adverb
Noun
Pronoun
Define open word classes.
Closed set of function words
Classes that accept new members (nouns, verbs, adjectives, adverbs)
Classes that never change
Prepositions only
Recall which is a closed class.
Verb
Preposition
Adjective
Adverb
Classify “the” in word class.
Verb
Determiner
Adjective
Pronoun
Distinguish noun vs pronoun.
Both are identical
Noun names things; pronoun replaces noun
Pronoun is descriptive
Noun is functional
Describe interjections.
Complex phrases
Exclamatory expressions (Oh!, Wow!)
Helping verbs
Closed class
Define POS tagging.
Tokenizing text
Assigning word classes to tokens
Removing stopwords
Normalizing text
Identify the POS tag for “run” in “I will run fast”.
Noun
Verb
Adjective
Adverb
Describe rule-based POS tagging.
Uses probabilities
Uses handcrafted grammar rules
Uses embeddings
Uses CRFs
Recall the Penn Treebank tag for plural noun.
NN
NNS
VB
JJ
Distinguish supervised from unsupervised tagging.
Both require labeled data
Supervised uses labeled corpora; unsupervised uses clustering
Unsupervised is faster always
Both use rules only
Examine application of POS tagging.
Speech synthesis
Parsing and information extraction
Image recognition
Sorting words
Define HMM.
Statistical model with hidden states and observed outputs
Rule-based grammar model
Embedding model
Parsing algorithm
Identify hidden states in POS tagging.
Words
POS tags
Sentences
Morphemes
Recall observable sequence in HMM tagging.
Words in a sentence
POS tags
Morphemes
Syntax tree
Describe transition probabilities.
Probability of tag given previous tag
Probability of word given tag
Probability of morpheme
Probability of sentence length
Distinguish emission vs transition.
Both same
Emission: word given tag; Transition: tag given previous tag
Transition is word-based
Emission ignores probabilities
Explain limitation of HMM in tagging.
Always accurate
Cannot handle long dependencies well
Ignores syntax
Uses neural networks
Define Viterbi algorithm.
Sorting method
Dynamic programming algorithm for most probable sequence
Neural embedding method
Parsing algorithm
Identify what Viterbi computes in POS tagging.
Lexicon
Best sequence of tags
Syntax tree
Lemmas
Recall Viterbi initialization step.
Probability = 1 for all tags
Start probabilities assigned to first word
Transition matrix only
Zero for all
Distinguish forward vs Viterbi algorithm.
Both same
Forward sums probabilities; Viterbi chooses maximum
Forward ignores states
Viterbi ignores probabilities
Describe backtracking in Viterbi.
Recovering best tag sequence
Building syntax tree
Tokenizing
Counting words
Examine time complexity of Viterbi.
O(n)
O(n × T²) (n = words, T = tags)
O(T^n)
O(1)
Define Named Entity Recognition (NER).
Identifying proper nouns like person, location, organization
Tokenization
POS tagging
Parsing
Identify the entity in “Google was founded in California”.
Founded
Google = Organization, California = Location
Organization only
Action word
Recall common NER categories.
Pronoun, Verb, Adjective
Person, Location, Organization, Date
Root, Stem, Affix
Syntax, Pragmatics
Distinguish NER from POS tagging.
Both same
NER detects named entities; POS tags word classes
POS is for parsing
NER ignores text
Describe BIO tagging scheme.
Bigram model
Begin-Inside-Outside notation for entities
Binary index operator
Bag-of-words
Explain application of NER.
Information extraction in text (e.g., news, resumes)
Syntax analysis
Tokenization
Lowercasing
Define CRFs.
Neural networks
Probabilistic sequence models discriminatively trained
Rule-based grammar
Embedding models
Identify difference between HMM and CRF.
Both are generative
HMM is generative; CRF is discriminative
Both discriminative
HMM ignores probabilities
Recall why CRFs are better for NER.
Faster
They capture overlapping, global features
Use fewer labels
No probabilities needed
Describe feature function in CRF.
Maps input sequence and label sequence to real values
Tokenizes text
Embeds words
Parses grammar
Distinguish linear-chain CRF.
Specialized for sequential data like text
Ignores sequence order
Used for parsing trees
Random clustering
Explain training challenge of CRF.
Easy optimization
High computational cost
Small data requirement
No labeling needed
Define the standard metrics for NER evaluation.
BLEU, Perplexity
Precision, Recall, F1-score
Accuracy only
Word error rate
Identify what precision measures.
Correct entities out of predicted entities
Correct entities out of total entities
Predicted entities out of all tokens
Errors in tagging
Recall recall formula.
TP / (TP+FP)
TP / (TP+FN)
FP / (TP+FN)
FN / (TP+FP)
Distinguish micro vs macro evaluation.
Micro averages over all instances; Macro averages over classes
Both same
Micro ignores recall
Macro ignores precision
Describe effect of high recall but low precision.
Few entities detected
Many false positives included
Many entities missed
Perfect accuracy
Explain CoNLL evaluation metric.
F1 score for entity-level evaluation
Word error rate
BLEU score
Entropy
