AD-802-A Natural Language Processing

Natural Language Processing (AD-802-A) Important Questions

RGPV · B.Tech · AI & Data Science · Semester 8 · Current scheme · 0 papers

  1. Read the answers

    Start with the topics that come every year.

  2. Revise unit notes

    Go through each unit once to score more.

Paperwala Imp Topics - Natural Language Processing important questions

Download Paperwala Imp Question & Answer (PDF)

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 the short answer. Then come the points to write, a diagram and an exam tip. The topics are chosen from the syllabus.

Q1. Natural Language Processing: scope, applications and challenges

From the syllabus · Unit 1

From the papers

  • “Unit 1: Definition and scope, applications in various domains, challenges and limitations.” (Syllabus)

The short answer

Natural Language Processing (NLP) is the field that lets computers read, understand and produce human language. Its scope runs from spelling checks to translation and chat systems.

Write these points

Scope

  • NLP sits between computer science, linguistics and machine learning.
  • The input is text or speech. The output is a label, a structure, a number or new text.
  • Main tasks are tagging, parsing, meaning extraction, search, summary, translation and dialogue.

Applications in many domains

  • Search and email: query matching, spam filters, auto complete.
  • Banking and law: reading forms, contracts and complaints.
  • Health: pulling drug names and symptoms out of doctor notes.
  • Education: essay scoring and doubt answering bots.
  • Voice assistants: speech to text, intent finding and reply.

Challenges and limits

  • Ambiguity: one sentence can have many meanings.
  • Variation: spelling, slang and code mixing such as Hinglish.
  • Context: meaning depends on earlier sentences and world knowledge.
  • Low resource languages: many Indian languages have little labelled data.
  • Bias and errors: a model repeats the faults of its training text.

One sentence, two readings.

Sentence: I saw the man with a telescope.

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

A person picks one from context. A program needs rules or data to do the same.

Real-life example

When you type a train name in the IRCTC app and it still finds the right train after a spelling mistake, an NLP step has fixed the word. When you speak to your phone in Hindi and it sets an alarm, NLP turns speech into text and finds your intent. Each step handles one level of language.

Diagram: Natural Language Processing: scope, applications and challenges

Same or opposite: NLP and plain text search

PointNLPPlain keyword searchSame or opposite
Unit usedWords with meaning and structureExact character stringsOpposite
Handles ambiguityTries toDoes notOpposite
Needs text as inputYesYesSame
Language knowledgeGrammar, meaning, dataNoneOpposite

Exam tip. Define NLP first, then list scope, three applications and four challenges in that order. Give the telescope sentence as the ambiguity example. Marks are lost when students only list applications.

Back to the topic list

Q2. Tasks in syntax, semantics and pragmatics

From the syllabus · Unit 1

From the papers

  • “Unit 1: NLP tasks in syntax, semantics and pragmatics.” (Syllabus)

The short answer

The tasks of NLP are grouped by level. Syntax studies the structure of a sentence, semantics its meaning and pragmatics its meaning in use.

Write these points

Tasks by level

LevelQuestion it answersTypical tasks
SyntaxHow are the words arranged?POS tagging, parsing, chunking
SemanticsWhat does it mean?Word sense, roles, logic form
PragmaticsWhat does the speaker intend?Intent, reference, politeness
  • A sentence can be correct in syntax and still make no sense. Example: Colourless green ideas sleep furiously.
  • A sentence can be clear in meaning and still depend on context. Example: Can you pass the salt? It is a request, not a question about ability.
  • Ambiguity exists at every level. A word has many senses, a phrase has many parses and a request has many intents.
  • Real systems run these levels in a pipeline. An error at the first level spreads to the next.

Three levels on one sentence: The bank is closed.

Syntax: noun phrase The bank plus verb phrase is closed.

Semantics: bank is a money institution or a river side. Closed is an adjective state.

Pragmatics: the speaker may be warning you not to go there today.

Real-life example

At a railway counter a clerk says, Platform is free now. The grammar is simple. The meaning is the state of the platform. The intent is to tell you to board quickly. NLP tasks copy this reading in three layers.

Diagram: Tasks in syntax, semantics and pragmatics

Same or opposite: syntax and semantics

PointSyntaxSemanticsSame or opposite
StudiesForm and order of wordsMeaning of words and sentencesOpposite
Output exampleParse treeLogical form or sense labelOpposite
Needs the other levelYes, in a pipelineYes, in a pipelineSame
Can be wrong while the other is rightYesYesSame

Exam tip. Draw the three row table in the answer. Use one sentence and read it at all three levels. This single example earns the marks for application.

Back to the topic list

Q3. Boolean, vector space and probabilistic models

From the syllabus · Unit 1

From the papers

  • “Unit 1: Data models such as Boolean, vector and probabilistic.” (Syllabus)

The short answer

An IR style data model says how documents and queries are represented and matched. The three main ones are the Boolean, vector space and probabilistic models.

Write these points

The three models

  • Boolean: a document either matches the query terms with AND, OR, NOT or it does not. No ranking.
  • Vector space: documents and queries are vectors of term weights. Rank by the cosine of the angle between them.
  • Probabilistic: rank documents by the chance that a document is relevant to the query.

Weights in the vector model

  • tf is the count of the term in a document.
  • idf = log10(N / df). A rare term gets a high weight.
  • Weight = tf x idf. The cosine score lies between 0 and 1.

Cosine ranking on three documents.

D1: the cat sat on the mat. D2: the dog sat on the log. D3: cats and dogs are pets. Query: cat sat. N = 3.

df(cat) = 1, so idf = 0.477. df(sat) = 2, so idf = 0.176.

Cosine scores: D1 = 0.635, D2 = 0.076, D3 = 0.000. So the order is D1, D2, D3.

Boolean: cat AND sat gives only D1. cat OR dog gives D1 and D2 with no order.

Real-life example

A college library catalogue that only says found or not found works like the Boolean model. An online book store that shows the best match first works like the vector model. It scores each book against your words.

Diagram: Boolean, vector space and probabilistic models

Same or opposite: Boolean and vector space model

PointBooleanVector spaceSame or opposite
ResultSet of matchesRanked listOpposite
Term weightsPresent or absenttf x idfOpposite
Query formLogical expressionBag of wordsOpposite
Uses the words of the documentYesYesSame

Exam tip. State all three models in one line each, then solve the cosine example with the idf values. Show the final ranking. Examiners reward the number steps.

Back to the topic list

Q4. Comparison of classical NLP models

From the syllabus · Unit 1

From the papers

  • “Unit 1: Comparison of classical NLP models.” (Syllabus)

The short answer

Classical NLP models are the older families that solve language tasks by rules, statistics or search. They differ in where the knowledge comes from.

Write these points

Five families

  • Rule-based: experts write grammar and word rules. Precise on known cases and weak on new text.
  • Statistical: probabilities are learned from a corpus. Handles noise and needs labelled data.
  • Information retrieval: treats text as a bag of words and ranks by weights.
  • Rule-based machine translation: analyse the source, transfer the structure, generate the target using hand written rules and dictionaries.
  • Probabilistic graphical model: a graph links variables with probabilities. HMM and CRF are examples.
ModelKnowledge fromStrengthWeakness
Rule-basedExpertsClear and exactCostly, brittle
StatisticalCorpusCopes with noiseNeeds data
IR modelTerm countsFast searchIgnores order
Rule MTDictionaries and rulesControlled outputHard to scale
GraphicalCorpus and structureHandles sequencesTraining cost

Choosing a model for a task.

Task: pick out a fixed form number such as RGPV/CS/2024. A rule (a pattern) is enough.

Task: tag words in news text. A statistical or graphical model is better because rules fail on new words.

Real-life example

A bank form reader that checks fixed fields uses rules. A spam filter that learns from past emails is statistical. A search bar uses an IR model. Real products mix them.

Diagram: Comparison of classical NLP models

Same or opposite: rule-based and statistical models

PointRule-basedStatisticalSame or opposite
Source of knowledgeHuman expertsDataOpposite
Behaviour on new textBreaksDegrades slowlyOpposite
Needs tuning and testingYesYesSame
Output can be explainedEasilyLess easilyOpposite

Exam tip. Make a table with five rows, one per model. Fill source, strength and weakness. A table scores better than a paragraph for this question.

Back to the topic list

Q5. Linguistic essentials

From the syllabus · Unit 2

From the papers

  • “Unit 2: Linguistic essentials: phonetics, phonology, morphology, syntax, semantics, pragmatics, semiotics, discourse analysis, psycholinguistics, corpus linguistics.” (Syllabus)

The short answer

Linguistic essentials are the layers of language study that NLP builds on: sounds, word forms, sentence structure, meaning and use.

Write these points

Layers

  • Phonetics studies the physical speech sounds. Phonology studies how a language arranges them.
  • Morphology studies the smallest meaning units, called morphemes.
  • Syntax studies how words form phrases and sentences.
  • Semantics studies the meaning of words and sentences.
  • Pragmatics studies meaning in context and the speaker intention.
  • Semiotics studies signs and what they stand for.

Wider areas

  • Discourse analysis: how sentences link into a text, for example by pronouns.
  • Psycholinguistics: how people learn and process language.
  • Corpus linguistics: the study of language from large collections of real text.

One word through the layers: unhappily.

Phonetics: the sounds of the spoken word. Morphology: un + happy + ly.

Syntax: an adverb that modifies a verb. Semantics: in a sad way. Pragmatics: may be said with irony.

Real-life example

When a student says, Sir, the fan is not working, the words give the fact. The intent is a request to fix it. Pragmatics reads what the words do not state. A computer needs the same step to answer such a line.

Diagram: Linguistic essentials

Same or opposite: phonetics and phonology

PointPhoneticsPhonologySame or opposite
StudiesPhysical soundsSound patterns of one languageOpposite
LevelProduction and hearingMental systemOpposite
Both concern speechYesYesSame
Used in speech recognitionYesYesSame

Exam tip. List the layers from sound to use in order, with one line each. Add the example word to show all layers act on one item.

Back to the topic list

Q6. Morphology and finite state transducers

From the syllabus · Unit 2

From the papers

  • “Unit 2: Word formation processes, morphological analysis, morphological finite state transducers.” (Syllabus)

The short answer

Morphology studies how words are built from morphemes. Morphological analysis splits a word into its stem and affixes, usually with a finite state transducer (FST).

Write these points

Word formation

  • Inflection changes form but not class: walk, walks, walked.
  • Derivation makes a new word and often a new class: happy, happiness.
  • Compounding joins words: blackboard.
  • Affixes are prefixes, suffixes and infixes. A stem carries the main meaning.

Finite state transducer

  • An FST reads an input string and writes an output string while it moves between states.
  • It maps a surface form such as cities to a lexical form such as city+N+PL.
  • Spelling rules, such as y changing to ie, are written as small machines. A lexicon gives the stems.
  • The same machine runs both ways, so it can analyse and generate.
def plural(w):
    if w.endswith(('s','x','z','ch','sh')): return w + 'es'
    if w.endswith('y') and w[-2] not in 'aeiou': return w[:-1] + 'ies'
    return w + 's'
# cat->cats  box->boxes  city->cities  boy->boys  church->churches

Analysis of cities.

The lexicon gives the stem city. The spelling rule changes y to ie before s.

Output: city +N +PL. The reverse run of the same machine gives cities.

Real-life example

A Hindi spell checker must know that ladka becomes ladke in some forms. A morphological analyser stores such rules once. This saves it from storing every word form.

Diagram: Morphology and finite state transducers

Same or opposite: inflection and derivation

PointInflectionDerivationSame or opposite
Changes word classNoOftenOpposite
Makes a new dictionary wordNoYesOpposite
Uses affixesYesYesSame
Exampleswalks, walkedhappinessOpposite

Exam tip. Define morpheme. Draw the FST as states and arcs, then run one word through it. The short code shows that you know the rule.

Back to the topic list

Q7. Tokenization, stemming and lemmatization

From the syllabus · Unit 3

From the papers

  • “Unit 3: Tokenization, lemmatization, stemming.” (Syllabus)

The short answer

Tokenization splits text into tokens. Stemming and lemmatization reduce a word to a base form, by cutting endings or by using a dictionary.

Write these points

Steps

  • Tokenization: split on spaces and punctuation, then handle cases such as U.S.A., short forms and email addresses.
  • Stemming: rule based, fast, may give a non word. Example: ponies gives poni.
  • Lemmatization: needs the part of speech. Example: better gives good and was gives be.
  • Use stemming for search. Use lemmatization when the exact word form matters.
def stem(w):
    for suf, rep in [('sses','ss'),('ies','i'),('ing',''),('ed',''),('s','')]:
        if w.endswith(suf) and len(w) - len(suf) > 2:
            return w[:len(w) - len(suf)] + rep
    return w
# caresses->caress  ponies->poni  walking->walk  played->play  cats->cat  is->is

Stem and lemma side by side.

Word studies: stem studi, lemma study.

Word was: a suffix rule has nothing to cut, lemma be.

Remember. The stemmer above is a small teaching version. The Porter stemmer has more rules and conditions.

Real-life example

In a college web search a student types running shoes and the shop finds a page with run shoe. Stemming made both forms the same word. A grammar tool uses lemmas to check the verb form.

Diagram: Tokenization, stemming and lemmatization

Same or opposite: stemming and lemmatization

PointStemmingLemmatizationSame or opposite
MethodCut suffix by rulesDictionary and grammarOpposite
OutputMay not be a real wordReal wordOpposite
SpeedFastSlowerOpposite
Reduces word formsYesYesSame

Exam tip. Show one word where the two differ, for example was gives be. State which one search engines prefer. Keep the code short.

Back to the topic list

Q8. Types of POS tagging

From the syllabus · Unit 3

From the papers

  • “Unit 3: Types of POS tagging: rule-based, stochastic, transformation-based, lexical.” (Syllabus)

The short answer

Part-of-speech (POS) tagging assigns a tag such as noun or verb to each word. The four approaches are rule-based, stochastic, transformation-based and lexical.

Write these points

Approaches

  • Rule-based: a lexicon lists possible tags. Hand written rules remove the wrong ones.
  • Stochastic: choose the tag sequence with the highest probability, as in HMM taggers.
  • Transformation-based (Brill): start with the most common tag, then apply learned repair rules in order.
  • Lexical: give each word its most frequent tag from a tagged corpus. No context is used.

Why it is hard

  • Many words have more than one tag. Book is a noun or a verb.
  • New words are not in the lexicon.
  • A good tagger reaches about 97 percent on English news text.

A Brill style repair rule.

Start: Can/MD you/PRP book/NN a/DT seat/NN. Book is tagged noun because it is mostly a noun.

Learned rule: change NN to VB when the previous tag is a personal pronoun. Now book/VB is correct.

Real-life example

A railway enquiry bot hears Book a ticket and Read the book. The same word is a verb in one and a noun in the other. A tagger must tell them apart to answer correctly.

Diagram: Types of POS tagging

Same or opposite: rule-based and stochastic tagging

PointRule-basedStochasticSame or opposite
KnowledgeHand made rulesLearned probabilitiesOpposite
Needs tagged corpusNoYesOpposite
Fixes ambiguous wordsYesYesSame
Easy to explainYesLessOpposite

Exam tip. Name all four types with one line and an example for each. Add the book noun and verb example. Give the 97 percent figure only as an approximate level.

Back to the topic list

Q9. HMM tagging and the Viterbi algorithm

From the syllabus · Unit 3

From the papers

  • “Unit 3: Part-of-speech tagging, hidden Markov model.” (Syllabus)

The short answer

A Hidden Markov Model (HMM) tagger treats tags as hidden states and words as observations. The Viterbi algorithm finds the best tag sequence.

Write these points

Model parts

  • Transition probability P(tag | previous tag).
  • Emission probability P(word | tag).
  • Start probability of the first tag.
  • The best sequence is the one that maximises the product of all these terms.

Viterbi steps

  1. Set the first column: start probability x emission of word 1.
  2. For each later word and tag, take the maximum over the previous tags of (previous score x transition).
  3. Multiply by the emission of the word. Store the winning previous tag.
  4. At the end pick the highest score and follow the stored tags back.

Tag: Ram eats rice, with tags N and V.

Start N = 0.7 and V = 0.3. Emission N: ram 0.4, eats 0.05, rice 0.4. V: ram 0.01, eats 0.6, rice 0.02.

Transition N to N 0.3, N to V 0.7, V to N 0.8, V to V 0.2.

Word 1: N = 0.28, V = 0.003. Word 2: N = 0.0042, V = 0.1176. Word 3: N = 0.037632, V = 0.00047.

The best end is N. Following back gives N V N: Ram/N eats/V rice/N.

Remember. The probabilities above are made up to show the working. A real tagger learns them from a tagged corpus.

Real-life example

A phone keyboard that suggests the next word guesses from the last word. An HMM tagger does a similar count of what usually follows a tag. It uses the whole sentence to pick the best path.

Diagram: HMM tagging and the Viterbi algorithm

Same or opposite: HMM tagger and lexical tagger

PointHMM taggerLexical taggerSame or opposite
Uses contextYes, previous tagNoOpposite
Needs tagged corpusYesYesSame
AccuracyHigherLowerOpposite
Gives a tag to every known wordYesYesSame

Exam tip. Write the formula first, then fill the table column by column as shown. Show the back trace. A clean table gets full marks even if the last digit differs.

Back to the topic list

Q10. Maximum entropy model

From the syllabus · Unit 3

From the papers

  • “Unit 3: Maximum entropy model.” (Syllabus)

The short answer

The Maximum Entropy (MaxEnt) model picks the probability distribution that fits the training facts and assumes nothing more. It scores each tag using weighted features.

Write these points

Idea

  • A feature is a test on the word and its context, for example previous word is the.
  • Each feature has a weight for each tag. Training sets the weights.
  • P(tag | context) = exp(sum of weights) / Z, where Z adds over all tags so the total is 1.
  • It can use many overlapping features such as suffix, capital letter and neighbours. An HMM cannot do this easily.

Tag a word with two features.

Features: word ends in s, previous word is the. Weights for N: 0.2 and 1.5. For V: 0.9 and minus 1.0.

Score N = exp(1.7) = 5.47. Score V = exp(minus 0.1) = 0.905. Z = 6.38.

P(N) = 0.858 and P(V) = 0.142. The tag is N.

Remember. The weights above are made up to show the working. A real model learns them from data.

Real-life example

A form filler at a bank branch decides whether a word is a name by looking at clues. It looks at a capital letter, the word before it and the ending. The model combines all clues into one score.

Diagram: Maximum entropy model

Same or opposite: MaxEnt and HMM

PointMaxEntHMMSame or opposite
TypeDiscriminativeGenerativeOpposite
Rich overlapping featuresYesHardOpposite
Gives tag probabilitiesYesYesSame
Needs labelled dataYesYesSame

Exam tip. Write the formula with the normaliser Z, then compute one worked score. State why features can overlap. This is the point examiners look for.

Back to the topic list

Start with the latest papers

Previous year papers will be added soon!

Natural Language Processing (AD-802-A) 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: Natural Language Processing: scope, applications and challenges; Tasks in syntax, semantics and pragmatics; Boolean, vector space and probabilistic models; Comparison of classical NLP models; Linguistic essentials.

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 (AD-802-A) for RGPV B.Tech AI & Data Science semester 8, chosen from the syllabus. No past paper of this subject is on this site yet, so repeats could not be counted.