NLP Finalll
NLP Finalll
Types of Morphology:
1. Inflectional Morphology: Changes a word's form to express different grammatical categories
(e.g., tense, number, case). Example: "walk" — "walked."
2. Derivational Morphology: Creates new words by adding prefixes or suffixes. Example: "happy"
— “unhappy.”
Parameter inflectional Morphology Derivational Morphology
Function Modifies a word to express grammatical Creates a new word by adding prefixes or
categories (e.g., tense, number, case) suffixes, often changing the meaning and
without changing its core meaning. sometimes the grammatical category.
Word Category Does not change the grammatical category Often changes the grammatical category of
of the word (e.g., verb remains a verb). the word (e.g., noun to adjective).
Meaning Retains the original meaning of the word, Can change the meaning of the base word
adding grammatical information. significantly.
Productivity Highly regular and applies broadly across Less regular and can be limited to specific
word classes (e.g., pluralization of nouns). words or contexts.
Number of Usually adds a single morpheme (e.g., "-s," May add one or more morphemes (e.g.,
Morphemes "-ed"). un-," "-ness").
Position Typically occurs at the end of a word Can occur at the beginning (prefixes) or end
(suffixes) In English (e.g., "-s," "-ed"). (suffixes) of a word (e.g., “pre-," "-ly").
Obligatoriness Required to convey correct grammatical Optional and used to create new words or
meaning (e.g., tense, plurality). change meaning.
« Since customers express their thoughts and feelings more openly than ever before, sentiment
analysis is becoming an essential tool to monitor and understand that sentiment.
® Automatically analysing customer feedback, such as opinions in survey responses and social
media conversations, allows brands to learn what makes customers happy or frustrated, so
that they can tailor products and services to meet their customers’ needs.
* For example, using sentiment analysis ta automatically analyse 4,000+ reviews about your
product could help you discover if customers are happy about your pricing plans and
customer service.
just list 5 advantage of
sentimental analysis system in
alle)
©) 1. Market Insights
3. Brand Monitoring
4. Enhanced Decision-Making
5. Automated Insights
Word Meaning Relationships
1. Modeling Morphological Rules: FSAs represent the rules governing how words are formed from
roots and affixes (prefixes, suffixes), capturing valid transitions for combining morphemes.
2. Word Segmentation: FSAs segment words into their constituent morphemes (e.g.,
“unhappiness” > “un-", "happy," "-ness"), helping to understand meanings and grammatical
functions.
3. Generating Word Forms: They can generate all possible inflected forms of a base word, like
"play" to "plays," “playing,” "played," which is essential for languages with rich inflections.
5. Efficiency: FSAs are computationally efficient, making them suitable for processing large
datasets and complex morphological structures.
6. Integration: FSAs can be combined with other models, like context-free grammars, to capture
both morphological and syntactic aspects of language.
A. il
Tagging
a2 PA rt-Of-Speech
part-of-speech tagging (or just tagging for short) is the process of assigning a part-of-speech
lexical class marker to each word in a corpus. Tags are also usually applied to
or other
punctuati on markers; thus tagging for natural language is the same process as tokenization
for computer languages, although lags for natural languages are much more ambiguous.
The input to 4 tagging algorithm is a string of words and a specified tagset.
VB DT NN
Tagging algorithms automatically choose multiple tags for single word and select only one
best appropriate tag for that word. Although, tagging can be hard as it face lot of
and can be noun
disambiguation. E.g. word book can be consider as verb for book that flight
for please give me that book
@ «641.5.1 Phonetic and Phonological Knowledge
: )....Page no. : 18
(1-
(Introduction to NLP
(MU - Sem 7- Comp) Natural Language Processing (MU - Sem 7- Comp) (Introduction to NLP)....Page no. (1-19)
Natural Language Processing
response times.
er service
NLP can also help bus ine sse s. It o ffers faster custom A transit eration technology is one that allows user to type words as, they would
(ii)
answers to their questions.
Customers can receive immediate usually do (like ‘rashtrabhasha’ instead ‘RASHTRASHA) such as case sensitive
litate different
availab le' for developers to faci
(iii) Pre-trained learning models are typing rules.
to implement.
applications of NLP ; It makes them easy « Transit eration tools expect users to type English words phonetically. This allows
(iv) Natural Language Processing is the practice of teaching machines to understand and users to communicate in their own regional language of their choice.
interpret conversational inputs from humans.
and
(ii) Fonts Download
establish communication channels between humans
(v) NLP can be used to
Technology development for Indian language (TDIL) programme initiated by the
machines,
department of electronic and IT (DEIT), govt. of Indian has the objective to
(vi) The different implantations of NLP can help businesses and individuals save time,
develop information processing tools to facilitate human machine interaction in
improve efficiency and increase customer satisfaction.
Indian language and to develop technologies to access multilingual knowledge
2a «61.9.2 Disadvantages
of NLP resources.
(i) Training can be time-consuming. If a new model needs to be developed without the The fonts are being made available free for public through language CDS and
use model needs to be developed without the use of a pre-trained model, it can take web downloads for the benefit of massen.
(iv) NLP may require more keystrokes. * Padma’s goal is to bridge the gap between closed and open standard until the day
Unicode support is widely available on all platforms.
(v) NLP is unable to the new domain, and it has a limited function. That is why NLP is
built for a single and specific takes only. * Padma transforms Indic text encoded in proprietary formats automatically
Unicode.
Applications of NLP
It has led to the automation of speech-related tasks and human interaction. Some applications
of NLP include
° Translation Tools: Tools such as Google Translate, Amazon Translate, etc. translate sentences from one
language to another using NLP.
° Chatbots: Chatbots can be found on most websites and are a way for companies to deal with common
queries quickly.
© Virtual Assistants: Virtual Assistants like Siri, Cortana, Google Home, Alexa, etc. can not only talk to you
but understand commands given to them.
Applications of NLP
Question Answering
° Type in keywords to ask Questions in Natural Language.
Text Summarization
° The process of summarizing important information from a source to produce a shortened version
Machine Translation
° Use of computer applications to translate text or speech from one natural language to another. E.g.
Google translate- translating short, simple sentences
° DeepL : for translating longer and more complex texts.
Lee ——
Pee
‘Skip —— Skip + ed
Stemming
running run
Cats Cat
Programming Program
Wolves Wolf
Decreases Decrease
Stemming Lemmatization
Stemming is faster because it Lemmatization is slower as
chops words without knowing compared to stemming but it
the context of the word in knows the context of the word
given sentences. before proceeding.
It is a rule-based approach. It is a dictionary-based
approach
Accuracy is less. Accuracy is more as compared
to Stemming.
When we convert any word Lemmatization always gives the
into root-form then stemming dictionary meaning word while
may create the non-existence converting into root-form.
meaning of a word.
Stemming is preferred when Lemmatization would be
the meaning of the word is not recommended when the
important for analysis. meaning of the word is
Example: Spam Detection important for analysis.
Example: Question Answer
* Example:
2. Under-Stemming Error:
* The stemmer fails to reduce words to the same root when they should be combined.
* Example:
The process of lemmatizastion is used extensively in test mining. The test mining
process enables computers to extract relevant information from a particular set of text.
Some of the other areas where lemmatization can be used are as follows :
> 1. Sentiment analysis
s Sentiment analysis refers to an analysis of people’s messages, reviews or comments to
understand how they feel about something before the text is analysed, it is
lemmatized
> 2. Information retrieval environments
Lemmatizing is used for the purpose of mapping documents to common topics and
displaying search results. To do so, indexes when documents are increasing to large
numbers.
> 3. Biomedicine
Lemmatization can be used while morphologically analysing biomedical literature.
The Biolemmatizer tool has been for this purpose only.
It pulls lemmas based on the use of a word lexicon. But if the word is not found in the
lexicon, it defines the rules which turn the word into a lemma.
> 4. Document Clustering
Search engines like Google make use of lemmatization so that they can provide
better, more relevant results to their users.
even allows search engines to display relevant results and even
Lemmatization
expand them to include other information that reader may find useful.
. Search Engines: Stemming helps
search engines match user queries
with documents by reducing words
to their root forms, ensuring that
different word variations (e.g., run,
running) are treated as the same.
. Information Retrieval: By
stemming words in documents
and queries, information retrieval
systems retrieve more relevant
results despite word variations.
Lexicon in NLP:
* Lexicon: A collection of words and their meanings, used by NLP systems for understanding and
processing language.
* Purpose: Helps in identifying the correct meaning, grammatical features, or other linguistic
properties of words.
® Types:
* Word Sense Disambiguation: Helps in identifying the correct sense or meaning of a word
based on context.
* Role in NLP: Used in tasks like POS tagging, machine translation, and morphological analysis.
N-gram Models in NLP
N-grams are contiguous sequences of n items (words, characters, etc.) from a given text or speech.
N-gram models are used to predict the probability of the next word based on the previous words.
* Example:
e Use: Simple model for word prediction but does not capture word order or context.
« Example:
« Use: Captures some context by considering the relationship between adjacent words.
¢ Probability: P(w, | w.-:) — The probability of a word occurring given the previous word.
3. Trigram Model:
« Example:
« Use: Captures more context by considering two previous words when predicting the next
word.
« Probability: P(w, | w.-2, W.-1) - The prohability of a word occurring given the previous two
words.
Model Number of Words Context Example
Bigram 2 consecutive words Considers the previous word for prediction [I love", “love NLP*]
Trigram 3 consecutive words Considers the previous two words far prediction ("I love NLP"]
N-gram n consecutive words Considers the previous n-7 words for prediction [| love NLP models"
bbl 2.12 SMOOTHING
s of fla tte nin g a pro bab ili ty dis tri but ion implied by a languay
e Smoothing 1 s the proces
so me probability.
model so that all reasonable word sequences can occur with
by redistributing weight from hig
This involves broadening the distribution
probability regions to zero probability regions.
attempts to improve the accuracy;
Smoothing not only prevents zero probabilities, it
the model as a whole.
.a 2.12.1 Laplace smoothing
A lexical analyser can identify tokens with the help of regular expressions ang
dy,
t check the syntax of a given sentence
pattern rules. But a lexical analyser canno
to the limitations of the regular expressions.
e Regular expressions cannot check
balancing tokens, such as parenthesis.
Therefore, the phase uses context free
grammar (CFG). Thus, CFG is a
Fig. 3.1.1
superset of regular grammar.
The diagram implies that every regular grammar is also context-free CFG is an
important tool which describes the syntax of programming language.
Tanne eee eee- ;
eeen
ee ie
ceolain POStagging=
-_ = ==
=
a= = S| S| = = = =
_—=—
*: —_—=— > = i
== === =
-™ ee = U
ii
Noun ™
Verb v
Adjective a
Adverb r
— = -— — -_=—— ee
——
Se eS ee
-
—_—=— —— rrr rr rr rE rrr rere eee er eee eee ee ec el lc eErhlcraerlaerlaeer ee e
nt io n be lo w it s properties :
We me
i) The POS tagging is based on the probability of tag occurring.
(iii) If the words do not exist in the corpus, then there is no probability.
(iv) Different testing corpus, other than training corpus, are used.
frequent tags associated with a
(v) Itis the simplest POS tagging because it chooses most
word in training corpus.
wm 3.1.5 Transformation-based Lagging (TBL)
ed Brill tagging.
Transformation based tagging is also call
of the tra nsf orm ati on- bas ed lea rni ng. It is a rule-based algorithm
It is the instance
text.
for automatic tagging of POS to the given
wle dge in a rea dab le for m. It transforms one state to
TBL allows to have linguistic kno
on rules.
another state by using transformati
tur e of bo th the abo ve- men tioned taggers-rule-based
TBL can be though of as the mix
and stochastic.
t spe cif y whi ch tag s need to
it is als o ba se d on the rules tha
Like rule-based ta gg in g,
s.
be assigned to which word ma ti on ta i lar to
gger. Simi
i sf or
larity between stochast ¢ and tr an
Also we can see simi s ar e au to ma ti ca ll ced
y indu
ue-in which ru le
e :
lea rni ng tec hni q
stochastic, it is machin
from data.
Mate I
7 3.2.2 Difficulties/Challenges in POS Tagging
(iv) If a POS tagger gives poor accuracy, then this has an adverse effect on other tasks
that follow. This is called as downstream error propagation.
To improve accuracy, POS tagging is combined with other processing.
For example, joint POS tagging and dependency parsing is an approach to improve
accuracy compared to independent modelling.
(v) Sometimes a word on its own can give useful clues. For example, ‘the’ is a determiner.
Prefix ‘un’ suggests an adjective, such as ‘unfathomable’. Suffix ‘ly’ suggests adverb,
such as ‘importantly’. Capitalisation can suggest proper noun, such as ‘Angeles’.
(vi) A word can be tagged, it depends upon the neighbouring words and the possible tags
that those words can have.
ity. For
Word probabilities also play a part i n selecting the right tag to resolve ambigu
used as a verb and mostly used as a nou n.
example, ‘man’ is rarely
roa ch, one can cou nt tag frequencies of words in a tagged corpus
‘vii)In a statistical app
the mos t pro bab le tag. Thi s is called unigram tagging.
and then assign i‘.
Ty
aa — =-— = eeee ie
= ee
=
ee ee,
It may happen that we have observations but not the states. For example, we have
sequence of words but not the corresponding part-of-speech tags.
In this case, we model the tags as states and use the observed words to predict the
most probable sequence of tags. This is exactly what Maximum-Entropy Markov
Model (MEMM) does.
MEMM is a model that makes use of state-ti
me dependencies. It uses predictions of
the past and the current observation
to make current prediction,
PPS a oe oe a
Definition Starts from the root (start symbol) and Starts from the input string and attempts
derives the input string. to construct the parse tree up to the
root.
Direction of Left-to-right, constructing the parse tree Left-to-right, constructing the parse tree
Parsing from the top (root) to the leaves. from the leaves to the root.
Focus Tries to match the input string with the Tries to identify substrings in the input
grammar rules recursively, that match right-hand sides of grammar
rules.
Intermediate Starts with the start symbol and derives Reduces substrings of the input to non-
Form intermediate forms until the input string is terminals until the start symbol is
matched. reached.
Efficiency May explore unnecessary branches Typically more efficient with fewer
(backtracking required). unnecessary explorations.
Use Cases Used in recursive descent parsing and LL Used in LR parsers, such as SLR, CLR,
parsers, and LALR parsers.
Error Handling Errors may be detected late in the process. Errors are often detected early, as
reductions fail.
Grammar Works better with grammars that are left- Handles a wider range of grammars,
Compatibility factored and do not have left recursion. including those with left recursion.
Example For string "abc", starts from S$ +~A-B-+C For string "abc", reduces "abc" + C — B
— "abc". L + AS.
" 5.8.2 Formal Definition of PcFg
ilistic context-free ammar (;
A probabili ‘ er G is defineg by a quintuple
ple -
= (M, T; R, Ss, P)
Where
(i) Mis the set of non-terminal symbols
Gi) Tis the set of terminal symbols.
Definition A type of top-down parser that uses A type of bottom-up parser that uses
lookahead symbols to predict the next rule shifts and reductions to process the input.
to apply.
Parsing Strategy Top-down: Starts with the start symbal and Bottom-up: Starts with the input and
expands rules to match the input. reduces it to the start symbol.
Parsing Actions Expands non-terminals using a predictive Performs shift (push input to stack) and
table and matches terminals with input. reduce (apply grammar rules) operations.
Grammar Requires LL(1) grammar (left-factored and Handles a broader range of grammars,
Compatibility no left recursion). including LR grammars with left
recursion.
Lookahead Uses a single lookahead symbol to decide Uses the stack and input symbols to
the next move. decide actions, often without requiring
lookahead.
Error Detection Detects errors during expansion of non- Detects errors when no valid shift or
terminals when no match is found. reduce operation is possible.
Data Structures Uses 3 parse table to guide rule selection. Uses a stack to store symbols and
intermediate results.
Efficiency May be less efficient for complex More efficient and robust for a wider
grammars. range of grammars.
Use Cases Typically used in recursive descent parsing Used in LR parsers (SLR, CLR, LALR) for
SMT uses Statistical methods to translate text by learning patterns from a bilingual corpus.
Translation is based on probabilities to find the most likely target sentence for a given source
sentence.
Language Model ensures fluency by estimating the likelinood of a target sentence in the target
language.
Training data includes a parallel corpus (aligned sentences in source and target languages).
Probabilistic techniques like the Expectation-Maximization (EM) algorithm are used for
parameter estimation.
Outputs tend to be fluent but may lack semantic accuracy without a large and high-quality
training corpus.
The Porter Stemming Algorithm is a rule-based method for reducing words to their root form or
stem.
lt works by sequentially applying a set of predefined rules to remove common suffixes from
words.
The algorithm consists of 5 phases, each applying a series of rules to shorten or remove suffixes.
The goal is to reduce words like “running,” "runner," and "runs" to the same stem “run.”
Example:
® “runs” — “run”
The rules are based on suffix stripping and vowel/consonant patterns to avoid over-stemming.
lt handles a wide variety of English word forms, including regular and irregular inflections.
Example:
The algorithm is designed to be efficient and fast, often used in information retrieval and text
mining applications.
While effective for many cases, it does not always produce linguistically correct stems and may
create errors like over-stemming or under * mming.
Potential Problems in Context-Free Grammar (CFG)
1. Agreement:
e Issue: CFGs don't track dependencies like number, gender, or person automatically,
requiring complex rules to handle agreements.
2. Sub-categorization:
* Problem: Verbs require specific arguments (e.g., "eat" needs a direct object, but "sleep"
does not).
« Issue: CFGs have difficulty encoding verb-specific argument requirements, leading to overly
complex rules.
3. Movement:
¢ Problem: Syntactic movement (e.g., “What did she eat?" or passive constructions) is hard to
represent in CFGs.
e Issue: CFGs are not designed to handle reordering of sentence components, requiring
additional mechanisms to account for movement.
eee !S)--.-Page no. (4-3)
41 INTRODUCTION To semantic Rdves
po
Semantic Analysis is the process of findin 8 the meanin
oom puters to understand g from text It can direct
and interpret sentenc
€8, paragraphs, or whole docu
analysing their grammatical ments, by
structure, and identifying
the relationships between
individual words of the sentence in a pa
rticular context.
1 ei ee eet we ee ee ee eens pe ei ——
While the lexical approach can be a quick way for students to pick up phrases, it does
not produce much creativity.
phrases.
It can have the negative side effect of limiting people’s responses to safe fixed
learn the intricacies of
Since they don’t have to build responses, they don’t need to
language.
Corpus linguistics is the language that is expressed in its text corpus, its body of
“real
world” text.
Corpus study maintains that a reliable analysis of a language is more practicable
with corpora, that is collected in the natural context of that language.
The text — corpus method uses the body of texts written in any natural language. It
derives the set of abstract rules which govern that language.
These results can be used to find the relationships between the subject language and
these other languages which have been undergone a similar analysis.
Corpora have not only be used for linguistics research, they have also been used to
form dictionaries (e.g. The American Heritage Dictionary of the English Language in
of the English
1969), and grammar guides, such as A Comprehensive Grammar
Language, Published in 1985.
ae re ed Niet ae eal
lS ee
— al a la —— eS
e An example of a general corpus is the British National Corpus. Some corpora contal#
texts that are chosen from a particular variety of a language. —.
(MU-New Syllabus w.e.f academic year 22-23) (M7-83) Tech-Neo Publications...A SACHIN SHAH vent
(ii) The absence of a certain word can change the results considerably.
(iii) The algorithm determines overlaps only among the glosses of the senses being
considered.
(iv) Dictionary glosses are fairly short and do not provide sufficient vocabulary to relate
sense distinctions.
Pragmatic Analysis in NLP
Considers speaker's intentions, social context, and real-world knowledge.
Used in chatbots, sentiment analysis, and virtual assistants for realistic interactions.
Discourse analysis is a technique in
Natural Language Processing (NLP)
focused on understanding language
beyond individual sentences. Key
points:
Discontinous sets
the reference
efers
n one
text. Pages
Fig 5.4.2: Types of Referents which
Complicate the Reference Resolution
* Inferrables:
* Referents not explicitly mentioned but implied through context or logical reasoning.
« Example: "The picnic was wonderful. The sandwiches were delicious.” ("Sandwiches" are
inferred from “picnic’).
e Discontinuous Sets:
« Example: John met Mary at the park. Later, Mike joined them." ("Them" evolves to include
John, Mary, and Mike).
* Generics:
« Example: “Dogs are loyal animals." ("Dogs" refers to the category, not individual dogs).
e Discourse reference resolution involves identifying the entities, events, or concepts that
pronouns, noun phrases, or other referring expressions point to in a larger context.
¢ Challenges include resolving ambiguous pronouns, linking distant referents, and understanding
implicit or inferred meanings.
e |t requires handling anaphora (referring back), cataphora (referring forward), and bridging
references (implicit connections).
¢ Techniques often rely on syntactic parsing, semantic analysis, and machine learning madels
trained on annotated corpora.
e Successful resolution improves NLP tasks like machine translation, text summarization, and
question answering.
Reference Phenomena
« Reference phenomena in NLP involve how language refers to entities, objects, or concepts
within a text or discourse.
« It includes identifying and resolving how nouns, pronouns, and other linguistic elements refer to
the same or different things.
« Common forms of reference include direct reference (e.g., "the book"), pronominal reference
(e.g., "he," “she"), and definite/indefinite reference (e.g., "the dog" vs. “a dog").
« Resolving reference is crucial for maintaining coherence and continuity across sentences in a
text.
« Reference resolution is a key task in many NLP applications such as machine translation,
summarization, and question answering.
¢ Challenges include handling ambiguities, ellipses, and referents that are implied but not
explicitly mentioned.
Anaphora Reference
Anaphora reference occurs when a pronoun or noun phrase refers back to a previously
mentioned entity or concept within the text.
The word or phrase that the pronoun refers to is called the antecedent.
Example: “Tom went to the store. He bought some milk." ("He" refers to "Tom").
Anaphora resolution is the task of determining which antecedent a pronoun or noun phrase
refers to.
This process can be straightforward when the antecedent is close to the referring expression but
can become challenging when antecedents are distant or ambiguous.
It requires contextual understanding and often involves tracking entities across sentences or
even paragraphs.
Anaphora resolution techniques include rule-based methods, statistical models, and neural
network approaches in modern NLP systems.
Hobbs Algorithm in NLP
The Hobbs algorithm resolves anaphora by selecting the closest antecedent that matches the
grammatical and semantic properties of the pronoun.
It uses syntactic rules to assign scores to potential antecedents based on their proximity and
compatibility with the pronoun.
The nearest noun phrase that satisfies these constraints is chosen as the antecedent.
Example:
e The algorithm would select “John” as the antecedent for "He" because it is the closest noun
phrase in the same discourse and syntactically matches.
The algorithm works well for resolving simple, unambiguous references but can face challenges
with more complex or distant anaphora.
Advantages
Limitations
a
Natural Language Processing (MU - Sem 7- Comp) (Applications of NLP)...Page no, (6-1 3)
4. Privacy : You wouldn't hand your personal letters to an unknown translator together
with your financial affairs, therefore this is about things like private emails iin
financial records.
* Text summarization is the process of condensing a large piece of text into a shorter version
while preserving its essential meaning and key information.
e |t aims to make large amounts of text more accessible and easier to understand by highlighting
the main points.
* Extractive Summarization:
« Involves selecting and extracting key sentences or phrases directly from the source text to
form a summary.
*® The summary is composed of verbatim sentences or parts of sentences without altering the
original wording.
* Example:
e Original: “John went to the store to buy groceries. He picked up apples, oranges, and
bread. After that, he went home."
e Extractive Summary: “John went to the store to buy groceries. He picked up apples,
oranges, and bread."
*® Challenge: The summary may lack fluency and coherence because it directly extracts
sentences from the original text.
Abstractive Summarization:
* This approach is more flexible and can result in more coherent and natural summaries,
« Example:
* Original: “John went to the store to buy groceries. He picked up apples, oranges, and
bread. After that, he went home.”
* Abstractive Summary: “John bought some groceries, including apples, oranges, and
bread, before returning home.”
* Combines both extractive and abstractive methods, where key sentences are first extracted
and then rephrased or condensed for coherence.
* Example:
® Original: “John went to the store to buy groceries. He picked up apples, oranges, and
bread. After that, he went home."
® Hybrid Summary: "John bought groceries like apples, oranges, and bread before
heading home.”
e Key Challenges:
e Ensuring that the summary remains faithful to the original meaning while being concise.
e Applications:
e |tuses techniques like information retrieval, natural language processing, and machine learning
to extract or generate answers from a text corpus, database, or knowledge base.
e Ambiguity:
e Questions can often be ambiguous, and a QA system may struggle to determine the
exact meaning or intent.
place to store items, making it difficult to determine the correct answer without
additional context.
e Questions that involve multiple pieces of information or require logical reasoning are
challenging for QA systems to process.
e Example: “Who was the president of the United States before the Civil War, and what
was his stance on slavery?" requires understanding both historical context and a multi-
step answer.
* Context Dependency:
A question may rely heavily on context, making it difficult for systems to answer
without understanding the surrounding information.
Example: “What is it made of?" requires knowing what "it" refers to, which may not be
clear in isolation.
Example: For a question like “What were the causes of World War |?" a QA system may
need to extract and synthesize information from various sources to form a
comprehensive answer.
Ensuring that the system provides factually accurate answers is a major challenge,
especially when dealing with unverified or conflicting information from multiple
SOUrCES.
e Example: Generating answers that are both accurate and fluent is a challenge,
especially when there are multiple ways to phrase the same information.
® Questions that are poorly phrased, incomplete, or grammatically incorrect can lead to
inaccurate answers or failed queries.
e Example: "Where is the Eiffel Tower" vs. “Eiffel Tower where is" — handling such
variations requires robust natural language understanding.
Parameter Information Retrieval (IR) Information Extraction (IE)
data.
Output Ranked list of documents or resources. Structured data (e.g., tables, graphs, or
JSON with entities and attributes).
Goal To find and rank documents that are most To identify and extract key information,
relevant to the user's query. like names, dates, and relationships.
Techniques Search algorithms, TF-IDF, BM25, semantic Named Entity Recognition (NER), relation
Used matching, and deep learning. extraction, dependency parsing, etc.
Use Cases Search engines, document retrieval. Knowledge graph creation, database
recommendation systems. population, sentiment analysis,
Evaluation Precision, Recall, Fl-score, Mean Reciprocal Precision, Recall, Fi-score, extraction