NLP tasks and evaluation
Compare common text tasks and evaluation methods.
Match metrics to task structure, annotation quality and the intended use.
Interview questions
Choose a question to reveal its answer.
01EasyCoreHow does text classification differ from token classification?
Answer
How does text classification differ from token classification?
Assigns one or more predefined labels to a text input.
Categorize support tickets by issue type.
from collections import Counter
pred, ref = 'new york city'.split(), 'new york'.split()
match = sum((Counter(pred)&Counter(ref)).values())
p,r = match/len(pred),match/len(ref)
print(2*p*r/(p+r))Simple token overlap F1 for nonempty answers.
02EasyCoreWhat does named entity recognition extract?
Answer
What does named entity recognition extract?
Identifies and classifies spans corresponding to entity types.
Extract organization names and locations from articles.
03EasyCoreWhat is sentiment analysis?
Answer
What is sentiment analysis?
Estimates expressed attitude or sentiment from text.
Classify customer feedback as positive or negative.
04MediumHigh priorityHow does extractive QA find answers?
Answer
How does extractive QA find answers?
Returns a supported span from an input passage.
Locate a date explicitly written in a policy document.
05MediumHigh priorityWhat is abstractive summarization?
Answer
What is abstractive summarization?
Generates a concise summary that may use new phrasing.
Produce a short paraphrased account of a long article.
06MediumHow does exact-match evaluation work?
Answer
How does exact-match evaluation work?
Counts predictions matching a reference under a specified normalization.
Score short factual answers against expected strings.
07MediumHow is token-level F1 calculated for question answering?
Answer
How is token-level F1 calculated for question answering?
Harmonic mean of token overlap precision and recall for a defined comparison.
Evaluate partially overlapping short QA answers.
08MediumWhat does BLEU measure?
Answer
What does BLEU measure?
Measures modified n-gram precision with a brevity penalty against references.
Evaluate machine translation at corpus level.
09HardWhat does ROUGE measure?
Answer
What does ROUGE measure?
Family of overlap metrics commonly used for summary evaluation.
Measure reference n-gram or subsequence coverage.
10HardWhy measure inter-annotator agreement?
Answer
Why measure inter-annotator agreement?
Measures consistency among independent human labelers.
Check whether sentiment labels are reliably defined.
Priority and difficulty are editorial study recommendations.
Technical reference: Documentation / paper ↗
Try a few practice questions
Explore the questions before creating a free account.