Natural Language Processing Parsing and Syntactic Analysis 1 — Questions and Answers
Question 1: What does constituency parsing produce?
- A flat list of tokens
- A hierarchical tree of phrases grouped by grammatical roles (Correct answer)
- A sequence of POS tags
- A dependency graph between word pairs
Correct answer: A hierarchical tree of phrases grouped by grammatical roles
Constituency parsing breaks a sentence into nested phrases (NP, VP, etc.) arranged in a hierarchical tree structure.
Question 2: Which formalism is most commonly used to describe constituency grammars in NLP?
- Regular grammars
- Context-sensitive grammars
- Context-free grammars (CFG) (Correct answer)
- Dependency grammars
Correct answer: Context-free grammars (CFG)
Context-free grammars (CFGs) use rewrite rules like S → NP VP and are the standard formalism for constituency parsing.
Question 3: In dependency parsing, what does a directed arc from word A to word B represent?
- A is a synonym of B
- A is the head and B is the dependent (Correct answer)
- B is the head and A is the dependent
- A and B belong to the same phrase
Correct answer: A is the head and B is the dependent
In dependency parsing, an arc from A → B indicates A is the syntactic head governing the dependent B.
Question 4: Which of the following best describes a projective dependency tree?
- A tree where all arcs cross each other
- A tree with no arcs between words
- A tree where no two arcs cross when drawn above the sentence (Correct answer)
- A tree that only handles noun phrases
Correct answer: A tree where no two arcs cross when drawn above the sentence
A projective dependency tree is one in which dependency arcs do not cross when the words are laid out linearly, which holds for most English sentences.
Question 5: What is a parse tree ambiguity?
- A sentence with no valid parse
- A sentence that yields more than one valid parse tree under a grammar (Correct answer)
- A grammar rule that cannot be applied
- A tree with incorrect POS tags
Correct answer: A sentence that yields more than one valid parse tree under a grammar
Ambiguity in parsing occurs when a grammar produces multiple valid parse trees for the same input sentence, reflecting multiple interpretations.
Question 6: What is the role of part-of-speech (POS) tagging in the NLP pipeline?
- It generates syntactic parse trees directly
- It assigns grammatical categories (noun, verb, adjective, etc.) to each token (Correct answer)
- It removes stop words from text
- It segments sentences into clauses
Correct answer: It assigns grammatical categories (noun, verb, adjective, etc.) to each token
POS tagging labels each token with its grammatical category, which is a prerequisite for most syntactic parsing approaches.
Question 7: Which parsing strategy processes input left-to-right and builds the parse bottom-up using a stack and input buffer?
- Earley parsing
- CYK parsing
- Shift-reduce parsing (Correct answer)
- Recursive descent parsing
Correct answer: Shift-reduce parsing
Shift-reduce parsing maintains a stack and an input buffer, repeatedly shifting tokens onto the stack or reducing a stack sequence using grammar rules.
What does constituency parsing produce?