CI-702-D Natural Language Processing

Natural Language Processing (CI-702-D) Important Questions

These are the 10 Natural Language Processing (CI-702-D) topics we chose from the RGPV syllabus for RGPV B.Tech CSIT semester 7. No past paper of this subject is on this site yet, so we could not count repeats.

Download Paperwala Imp Question & Answer (PDF)

How we made this list
  • All papers on this site: 0
  • Answers: We wrote these answers with AI help from the real RGPV papers and the syllabus. A teacher has not checked them yet, so read them with your syllabus. How we make these

10 Natural Language Processing topics from the syllabus

Chosen from the syllabus. No past paper of this subject is on this site yet, so repeats could not be counted.

Natural Language Processing important questions with answers

Each answer starts with a short answer. Then come how often it was asked, the points to write, a diagram and an exam tip. The topics are chosen from the syllabus.

Q1. NLP and NLU: definition, uses and challenges

Short answer. Natural Language Processing (NLP) is the part of AI that lets computers read, understand and produce human language in text or speech. Its main difficulty is ambiguity: one word or sentence can carry several meanings.

From the syllabus · Unit 1

From the papers

  • “Unit 1 of the syllabus outline: NLU, levels of language analysis, morphology, finite-state parsing, regular expressions, stemming, spelling errors.” (Syllabus)

Write these points

Uses

  • Machine translation, such as Hindi to English.
  • Chatbots and voice assistants.
  • Spam filtering and sentiment analysis of reviews.
  • Search engines, spelling and grammar checkers.
  • Speech to text and text summarization.

Challenges

  1. Lexical ambiguity: 'bank' can be a river bank or a money bank.
  2. Syntactic ambiguity: 'I saw the man with a telescope' has two parses.
  3. Semantic and pragmatic meaning: sarcasm, idioms and context.
  4. Variety: spelling errors, slang, code mixing such as Hinglish.
  5. Low resource languages: little labelled data for many Indian languages.

Two readings of one sentence.

Sentence: 'I saw the man with a telescope.'

Reading 1: I used a telescope to see the man.

Reading 2: I saw a man who was holding a telescope.

A parser gives two different trees. Only context decides which one is meant.

Real-life example

You type 'book a ticket to Bhopal tomorrow' into a railway app. NLP finds that 'book' is a verb, 'Bhopal' is a place and 'tomorrow' is a date. The same word 'book' in 'my maths book' is a noun. A human sees the difference at once. Teaching a machine to see it is the work of NLP.

Applications of NLP
Applications of NLP

Difference between NLP and simple keyword search

PointNLPKeyword searchSame or opposite
Understands word meaningTries toNoOpposite
Works on textYesYesSame
Handles ambiguityPartlyNoOpposite
Needs language modelsYesNoOpposite

Exam tip. Define NLP in one line. Give five uses and five challenges with an example each. An ambiguity example with two readings earns extra marks.

Back to the topic list

Q2. Levels of language analysis: five phases of NLP

Short answer. NLP analyses language in five phases: lexical, syntactic, semantic, discourse integration and pragmatic analysis. Each phase builds on the output of the one before it.

From the syllabus · Unit 1

From the papers

  • “Unit 1 of the syllabus outline: NLU, levels of language analysis, morphology, finite-state parsing, regular expressions, stemming, spelling errors.” (Syllabus)

Write these points

Diagram: Levels of language analysis: five phases of NLP
  1. Lexical (morphological) analysis: split text into words and study word forms, such as 'played' = 'play' + 'ed'.
  2. Syntactic analysis (parsing): check grammar and build a parse tree. 'School go I' fails here.
  3. Semantic analysis: find the literal meaning. 'Hot ice cream' is grammatical but odd in meaning.
  4. Discourse integration: link a sentence with those around it. In 'Ravi came. He sat.', 'He' means Ravi.
  5. Pragmatic analysis: find the intended meaning. 'Can you pass the salt?' is a request, not a question about ability.

One sentence through the phases.

Text: 'Ravi bought apples. He ate them.'

Lexical: tokens Ravi, bought, apples, He, ate, them. 'bought' = 'buy' + past.

Syntactic: Ravi (subject), bought (verb), apples (object).

Discourse: He = Ravi, them = apples. Pragmatic: a simple report, no hidden request.

Real-life example

A teacher reading a student's leave letter uses all five phases. She reads the words, checks the grammar and gets the meaning. She links 'my mother' in line two with 'she' in line three. Finally she sees the purpose: a request for two days' leave. A program that only does the first two phases would miss the request.

Difference between syntactic and semantic analysis

PointSyntacticSemanticSame or opposite
ChecksGrammarMeaningOpposite
OutputParse treeMeaning representationOpposite
Part of the NLP pipelineYesYesSame
'Colourless green ideas sleep' passesYesNoOpposite

Exam tip. Draw the five phases as a stack. Write one line and one example for each. A sentence traced through all phases shows real understanding.

Back to the topic list

Q3. N-gram language models and bigram probability

Short answer. An n-gram language model gives the chance of a word from the n minus 1 words before it. A bigram model uses one previous word: P(w(i) | w(i minus 1)) = count(w(i minus 1) w(i)) / count(w(i minus 1)).

From the syllabus · Unit 2

From the papers

  • “Unit 2 of the syllabus outline: Computational phonology, text-to-speech, Bayesian methods, minimum edit distance, weighted automata, n-grams.” (Syllabus)

Write these points

Types

  • Unigram: P(w), each word on its own.
  • Bigram: P(w | previous word).
  • Trigram: P(w | two previous words).
  • Markov assumption: only the last n minus 1 words matter.

Sentence probability

P(sentence) = product of the n-gram chances, with start <s> and end </s> markers.

Bigram model from three sentences.

Corpus: '<s> i like tea </s>', '<s> i like coffee </s>', '<s> you like tea </s>'.

P(i | <s>) = 2/3 = 0.6667. P(like | i) = 2/2 = 1. P(tea | like) = 2/3 = 0.6667. P(</s> | tea) = 2/2 = 1.

P('<s> i like tea </s>') = 0.6667 x 1 x 0.6667 x 1 = 0.4444.

Uses

  1. Next word suggestion on a phone keyboard.
  2. Speech recognition: pick the most probable word sequence.
  3. Spelling correction.
  4. Machine translation output ranking.

Real-life example

When you type 'good' on a phone, the keyboard offers 'morning' and 'night'. It has seen 'good morning' and 'good night' often in its data. That is a bigram model at work. A trigram model would look at two words and offer 'luck' after 'all the best and good'.

Building a bigram model
Building a bigram model

Difference between bigram and trigram model

PointBigramTrigramSame or opposite
Context used1 word2 wordsOpposite
Based on countsYesYesSame
Data neededLessMoreOpposite
Zero countsFewerMoreOpposite

Exam tip. Write the bigram formula with counts. Compute the probabilities from a small corpus and the chance of one sentence. Name the Markov assumption.

Back to the topic list

Q4. Minimum edit distance and spelling correction

Short answer. Minimum edit distance is the least number of insertions, deletions and substitutions that turn one string into another, found by dynamic programming. Spelling correction uses it to find candidate words, then a Bayesian noisy channel picks the most probable one.

From the syllabus · Unit 2

From the papers

  • “Unit 2 of the syllabus outline: Computational phonology, text-to-speech, Bayesian methods, minimum edit distance, weighted automata, n-grams.” (Syllabus)

Write these points

The recurrence

  1. D[i][0] = i and D[0][j] = j.
  2. D[i][j] = minimum of D[i-1][j] + 1 (delete), D[i][j-1] + 1 (insert), D[i-1][j-1] + cost (substitute).
  3. Cost is 0 when the letters match, else 1 (or 2 in the Levenshtein textbook version).
  4. The answer is in the bottom right cell.
#the
#0123
t1012
e2111
h3212

Edit distances.

teh to the: 2 (table above). With a transposition step (Damerau) it is 1.

intention to execution: 5 with substitution cost 1, 8 with cost 2.

Spelling errors and the noisy channel

  • Non-word errors: 'teh' is not a word.
  • Real-word errors: 'piece' typed for 'peace'.
  • Pick the word w that makes P(w) x P(typo | w) largest.
  • P(w) comes from a language model, P(typo | w) from an error table.

Correcting 'teh'.

the: 0.05 x 0.001 = 0.00005. tea: 0.0005 x 0.0002 = 0.0000001.

The noisy channel picks 'the'.

Remember. The two probabilities are example values. The distances were run in calc.py.

Real-life example

When you type 'Bhopla' in a train booking app, it still suggests Bhopal. The app finds station names a small edit away and prefers the busy station. That is edit distance plus a prior.

Spelling correction
Spelling correction

Difference between non-word errors and real-word errors

PointNon-word errorReal-word errorSame or opposite
Found by a dictionary checkYesNoOpposite
Fixed with candidates and probabilitiesYesYesSame
Exampletehpiece for peaceOpposite
Needs contextLessYes, a language modelOpposite

Exam tip. Write the recurrence. Fill a small table such as teh and the. Show how the noisy channel chooses between two candidates.

Back to the topic list

Q5. Hidden Markov Model and Viterbi for POS tagging

Short answer. A Hidden Markov Model (HMM) tags words by treating tags as hidden states and words as observations. The Viterbi algorithm finds the most probable tag sequence using transition chances P(tag | previous tag) and emission chances P(word | tag).

From the syllabus · Unit 3

From the papers

  • “Unit 3 of the syllabus outline: HMM and speech recognition, Viterbi algorithm, speech feature extraction and synthesis, part-of-speech tagging.” (Syllabus)

Write these points

Parts of an HMM tagger

  • States: POS tags such as N (noun) and V (verb).
  • Start chances: P(first tag).
  • Transition chances: P(tag(i) | tag(i minus 1)).
  • Emission chances: P(word | tag).

Viterbi steps

  1. For the first word, score each tag = start x emission.
  2. For each next word and tag, score = best of (previous score x transition) x emission.
  3. Keep a back pointer to the best previous tag.
  4. At the end, follow the pointers back.
Diagram: Hidden Markov Model and Viterbi for POS tagging

Tag 'fish sleep'.

Start N 0.6, V 0.4. Emission: fish N 0.5, V 0.2; sleep N 0.1, V 0.6. Transitions N to N 0.3, N to V 0.7, V to N 0.6, V to V 0.4.

Word 1: N = 0.6 x 0.5 = 0.3; V = 0.4 x 0.2 = 0.08.

Word 2: V = max(0.3 x 0.7, 0.08 x 0.4) x 0.6 = 0.126 from N. N = max(0.3 x 0.3, 0.08 x 0.6) x 0.1 = 0.009.

Best path: fish = N, sleep = V.

Real-life example

A teacher guessing which students are absent only from the noise in a classroom works like an HMM. The noise level is the observation. Who is present is hidden. Knowing that Ravi and his friend usually come together is a transition chance. The teacher combines the clues to pick the most probable attendance list.

Difference between HMM tagger and rule based tagger

PointHMM taggerRule based taggerSame or opposite
Learns from dataYesNo, rules written by handOpposite
Assigns POS tagsYesYesSame
Handles ambiguityBy chancesBy rulesOpposite
Unknown wordsNeeds smoothingNeeds rulesSame

Exam tip. Name the three sets of chances. Draw the trellis and run Viterbi on two words with every product shown. Mark the back pointer.

Back to the topic list

Q6. Speech recognition: features, HMMs and Viterbi

Short answer. Speech recognition turns spoken audio into text. A classic recogniser turns short frames into features such as MFCCs, matches them with HMMs and a language model, then Viterbi finds the best word string.

From the syllabus · Unit 3

From the papers

  • “Unit 3 of the syllabus outline: HMM and speech recognition, Viterbi algorithm, speech feature extraction and synthesis, part-of-speech tagging.” (Syllabus)

Write these points

Diagram: Speech recognition: features, HMMs and Viterbi

Feature extraction

  • Cut the signal into 25 ms frames every 10 ms.
  • Apply a window and an FFT to each frame.
  • Pass through mel filters and take the log.
  • A cosine transform gives 13 MFCCs. Adding deltas and delta-deltas gives 39 numbers.

HMM recognition

  1. Each phone is an HMM with about 3 states.
  2. Word HMMs are joined phone HMMs from the pronunciation dictionary.
  3. The acoustic model gives P(features | words). The language model gives P(words).
  4. Viterbi finds the word string with the highest product.

Frames and word error rate.

2 seconds of audio: (2000 - 25) / 10 + 1 = 198 frames. 198 x 39 = 7,722 numbers.

Said: 'book a ticket to bhopal tomorrow'. Heard: 'book the ticket to bhopal'.

1 substitution and 1 deletion: WER = 2 / 6 = 33.3 percent.

Remember. Modern systems replace the HMM with neural networks, but the frames and features step is the same.

Real-life example

When you speak a destination into a maps app, it shows the words as you talk. The app turns your voice into frames, matches sounds and uses a language model of place names. Traffic noise raises the error rate, so a quiet room works better.

Difference between speech recognition and speech synthesis

PointRecognition (ASR)Synthesis (TTS)Same or opposite
DirectionSpeech to textText to speechOpposite
Works with phonemesYesYesSame
Uses HMMs in the classic designYesYesSame
Main measureWord error rateNaturalness scoreOpposite

Exam tip. Draw the recognition pipeline. Write the MFCC steps. Work out frames and WER for one sentence.

Back to the topic list

Q7. Context free grammar and parse tree

Short answer. A context free grammar (CFG) is a set of rules of the form A -> B C that build sentences from smaller phrases. A parse tree shows how the rules produce one sentence, with S at the root and words at the leaves.

From the syllabus · Unit 4

From the papers

  • “Unit 4 of the syllabus outline: Parsing CFG CKY Earley probabilistic, meaning representation, first-order predicate calculus, lexical semantics, WordNet.” (Syllabus)

Write these points

Parts of a CFG

  • Non-terminals: S, NP, VP, Det, N, V.
  • Terminals: the words.
  • Rules: S -> NP VP, NP -> Det N, VP -> V NP.
  • Start symbol: S.

Grammar and derivation for 'the dog saw a cat'.

Rules: S -> NP VP; NP -> Det N; VP -> V NP; Det -> the | a; N -> dog | cat; V -> saw.

S => NP VP => Det N VP => the dog VP.

the dog VP => the dog V NP => the dog saw Det N => the dog saw a cat.

Diagram: Context free grammar and parse tree

Points

  1. One sentence with two trees means the grammar is ambiguous.
  2. Chomsky normal form allows only A -> B C or A -> word, which CKY parsing needs.
  3. Probabilistic CFGs add a chance to each rule to pick the best tree.

Real-life example

A building plan is like a grammar. The plan says a house has a hall and rooms, a room has walls and a door. Any house built by the plan is valid, just as any sentence built by the rules is grammatical. The finished house drawn floor by floor is the parse tree.

Difference between parse tree and derivation

PointParse treeDerivationSame or opposite
FormA treeA sequence of stepsOpposite
Uses the grammar rulesYesYesSame
Shows phrase structureClearlyHidden in stepsOpposite
Order of rule use shownNoYesOpposite

Exam tip. Write the grammar as a numbered rule list. Show the derivation and draw the tree. Mention ambiguity and Chomsky normal form.

Back to the topic list

Q8. Parsing: top-down, bottom-up and CKY

Short answer. Parsing finds the syntactic structure of a sentence under a grammar. Top-down parsing starts from S and expands rules towards the words, while bottom-up parsing starts from the words and combines them up to S.

From the syllabus · Unit 4

From the papers

  • “Unit 4 of the syllabus outline: Parsing CFG CKY Earley probabilistic, meaning representation, first-order predicate calculus, lexical semantics, WordNet.” (Syllabus)

Write these points

Diagram: Parsing: top-down, bottom-up and CKY

Top-down

  • Goal driven. Never builds trees that cannot be a sentence.
  • Wastes time on rules that do not match the words.
  • Recursive descent is the simple form. Left recursion (NP -> NP PP) makes it loop.

Bottom-up

  • Data driven. Only builds pieces that match the words.
  • Builds many pieces that never reach S.
  • Shift-reduce parsing is a common form.

CKY (dynamic programming)

  1. Grammar must be in Chomsky normal form.
  2. Fill a triangular table: cell [i, j] holds the non-terminals that cover words i to j.
  3. Cells of length 1 come from word rules, longer cells combine two smaller cells.
  4. If S is in the top cell, the sentence is grammatical.

CKY on 'the dog barks' with S -> NP V, NP -> Det N.

Length 1 cells: Det (the), N (dog), V (barks).

Length 2 cell for 'the dog': NP, from Det + N.

Length 3 cell: S, from NP + V. So the sentence is accepted.

Real-life example

Solving a jigsaw puzzle shows both ways. One person starts from the picture on the box and looks for pieces that fit each part, which is top-down. Another starts joining pieces that fit each other until the picture appears, which is bottom-up.

Difference between top-down and bottom-up parsing

PointTop-downBottom-upSame or opposite
Starts fromSThe wordsOpposite
Builds a parse treeYesYesSame
Wasted work onRules not matching wordsPieces not reaching SOpposite
Trouble with left recursionYesNoOpposite

Exam tip. Define both with their start point. Give one strength and one weakness each. Show a small CKY table for full marks.

Back to the topic list

Q9. Word sense disambiguation and the Lesk algorithm

Short answer. Word sense disambiguation (WSD) picks the right meaning of a word with many senses from its context. The Lesk algorithm chooses the sense whose dictionary definition shares the most words with the context.

From the syllabus · Unit 5

From the papers

  • “Unit 5 of the syllabus outline: Word sense disambiguation, information retrieval, discourse, natural language generation, machine translation.” (Syllabus)

Write these points

Simplified Lesk

  1. Get all senses of the target word and their definitions (glosses).
  2. Take the words of the context sentence, without stop words.
  3. Count words shared between the context and each gloss.
  4. Pick the sense with the largest overlap.

Which 'bank'?.

Context: 'I went to the bank to deposit money'. Content words: went, bank, deposit, money.

Sense 1 gloss: 'a financial institution that accepts deposits and lends money'. Overlap: money (1 word; 2 if deposit and deposits are stemmed).

Sense 2 gloss: 'sloping land beside a body of water such as a river'. Overlap: 0.

Lesk picks sense 1, the money bank.

Other approaches

  • Supervised: train a classifier on sense-tagged text.
  • Knowledge based: WordNet paths and glosses, as Lesk does.
  • Unsupervised: cluster the contexts of a word.
  • Modern systems use contextual embeddings from models such as BERT.

Real-life example

When a friend says 'I am at the bank, the water is cold', you know she means a river bank. The words 'water' and 'cold' fit the river meaning. Lesk does the same counting of fitting words, but with dictionary definitions instead of experience.

Simplified Lesk
Simplified Lesk

Difference between Lesk and supervised WSD

PointLeskSupervised WSDSame or opposite
Needs sense-tagged training dataNoYesOpposite
Picks one sense per wordYesYesSame
UsesDictionary glossesLearned featuresOpposite
AccuracyLowerHigherOpposite

Exam tip. Define WSD with the 'bank' example. Write the four Lesk steps. Show the overlap count for two senses.

Back to the topic list

Q10. Machine translation

Short answer. Machine translation (MT) converts text from one language to another by computer. It has moved from rule based to statistical to neural systems, where an encoder reads the source and a decoder writes the target.

From the syllabus · Unit 5

From the papers

  • “Unit 5 of the syllabus outline: Word sense disambiguation, information retrieval, discourse, natural language generation, machine translation.” (Syllabus)

Write these points

Approaches

  • Rule based (RBMT): dictionaries and grammar rules written by experts.
  • Statistical (SMT): learns phrase tables and chances from parallel text.
  • Neural (NMT): encoder and decoder networks with attention, now Transformers.
  • Example based: reuses translations of similar sentences.
Diagram: Machine translation

Evaluation with BLEU

BLEU compares n-grams of the machine output with a human reference and adds a brevity penalty for short output.

Unigram precision and brevity penalty.

Candidate: 'the cat is on mat' (5 words). Reference: 'the cat is on the mat' (6 words).

Matching unigrams = 5, so precision = 5 / 5 = 1.0.

Brevity penalty = e^(1 minus 6/5) = 0.8187, because the output is shorter.

Remember. Full BLEU uses n-grams up to 4 and a geometric mean. Only the unigram part is shown here.

Real-life example

A traveller from Tamil Nadu in Bhopal uses Google Translate to read a Hindi sign. Older tools translated word by word and gave odd English. Neural MT reads the whole sentence first, so the output sounds natural. It still slips on local words and idioms.

Difference between statistical and neural MT

PointStatistical MTNeural MTSame or opposite
ModelPhrase tables and countsEncoder-decoder networkOpposite
Learns from parallel textYesYesSame
FluencyLowerHigherOpposite
Looks at whole sentenceNoYesOpposite

Exam tip. Name four approaches with one line each. Draw the encoder-decoder. Compute a small BLEU part with the brevity penalty.

Back to the topic list

Start with the latest papers

Previous year papers will be added soon!

Natural Language Processing (CI-702-D) FAQs

What are the most important topics in Natural Language Processing?

No past paper of this subject is on this site yet, so the topics were chosen from the syllabus. The first five: NLP and NLU: definition, uses and challenges; Levels of language analysis: five phases of NLP; N-gram language models and bigram probability; Minimum edit distance and spelling correction; Hidden Markov Model and Viterbi for POS tagging.

How were these Natural Language Processing important questions chosen?

Each topic was taken from the syllabus units. No past paper was available to count repeats, and the answers are not teacher-reviewed, so use them together with your syllabus.

Is there a PDF of Natural Language Processing important questions with answers?

Yes. The Paperwala Imp Question & Answer PDF for Natural Language Processing is free to download from this page.

The 10 topics of Natural Language Processing (CI-702-D) for RGPV B.Tech CSIT semester 7, chosen from the syllabus. No past paper of this subject is on this site yet, so repeats could not be counted.