NATURAL LANGUAGE PROCESSING · INTERVIEW QUESTION
Explain dependency parsing.
🟢 beginner · NLP
Hint: Focus on the decision rule, assumptions, and failure mode behind nlp.
Answer
Dependency parsing predicts directed grammatical relations between words, such as subject or object. It produces a tree useful for syntax-aware interpretation.
Interview reasoning
POS tags label token grammar, while dependency parsing links grammatical heads and dependents. A parse can distinguish the subject of a negated action from a nearby noun.
Syntactic and semantic structure answer different questions. POS tags categorize tokens, dependencies relate heads and dependents, while semantic roles connect predicates with arguments such as agent and patient. Parsing errors propagate into downstream extraction, so assess both the structural output and the business fact derived from it.
Worked example. In 'the doctor treated the patient', subject and object dependencies locate different participants.
Validation
Use tag accuracy and labeled or unlabeled attachment scores on held-out domains.
Use ambiguous and passive examples, evaluate tag or attachment/role metrics, and test downstream relation correctness.
Common pitfalls
Parsing conventions and tokenization must align with the gold annotation.
Syntax does not uniquely establish meaning. Ambiguous text and annotation conventions can create multiple defensible analyses.
Likely follow-up: Use tag accuracy and labeled or unlabeled attachment scores on held-out domains.