Natural Language Processing · TEE · papers

Q2A · NLP tasks and syntax versus semantics

Solved re-exam · February 2026

Actual re-examination · 9 February 2026 · 100 marks · 3 hours

Question. i. Discuss five different tasks associated with Natural Language Processing.
ii. Compare and contrast syntactic analysis and semantic analysis in NLP. Support your explanation with examples. [10 marks]

Answer

i. Five NLP tasks

TaskWhat it doesExample
Machine translationExpresses source-language content in a target languageEnglish “Good morning” → Hindi greeting
Sentiment analysisIdentifies the opinion or attitude expressed“The service was excellent” → positive sentiment
Named Entity RecognitionFinds and types entity spans“Asha joined Google” → PERSON and ORGANIZATION
Question answeringReturns an answer supported by a question’s relevant informationFrom a passage, identify who discovered a described result
Text classificationAssigns predefined category labelsClassify an email as spam or legitimate

ii. Syntactic and semantic analysis

BasisSyntactic analysisSemantic analysis
Main questionHow are words grammatically organised?What do the words and sentence mean?
Typical outputPOS tags, constituency or dependency structureWord senses, semantic relations or a meaning representation
Knowledge usedGrammar rules and structural patternsLexical meaning, context and semantic constraints
ExampleIdentify “The boy” as subject NP and “ate an apple” as VPInterpret the boy as eater and apple as the thing eaten

“Colourless green ideas sleep furiously” can have a plausible English grammatical structure while remaining semantically unusual. Syntax alone therefore does not guarantee ordinary meaning. Conversely, “boy eat apple yesterday” conveys a possible event despite grammatical errors.

The analyses support each other. In “I saw the man with a telescope,” syntactic PP attachment determines which meaning is available, and semantic knowledge can help choose a plausible attachment. A full NLP system often needs both.

Yaad rakho: Syntax = sentence ka structure; semantics = us structure ka meaning.