Question Answering
Question Answering
Answering
What
is
Ques+on
Answering?
Dan
Jurafsky
Ques%on
Answering
One
of
the
oldest
NLP
tasks
(punched
card
systems
in
1961)
Simmons,
Klein,
McConlogue.
1964.
Indexing
and
!"#$%&'( )&*#'%+,-.'$/#0$( Dependency
Logic
for
Answering
English
Ques+ons.
American
Documenta+on
15:30,
196-204
What do worms eat? Worms eat grass Horses with worms eat grass
worms horses
worms
eat with eat
eat
grass worms grass
what
Birds eat worms Grass is eaten by worms
birds worms
eat eat
2
worms grass
Dan
Jurafsky
WILLIAM WILKINSONS
AN ACCOUNT OF THE PRINCIPALITIES OF
WALLACHIA AND MOLDOVIA Bram
Stoker
INSPIRED THIS AUTHORS
MOST FAMOUS NOVEL
3
Dan
Jurafsky
Apples Siri
4
Dan
Jurafsky
Wolfram Alpha
5
Dan
Jurafsky
Commercial
systems:
mainly
factoid
ques%ons
Paradigms
for
QA
IR-based
approaches
TREC;
IBM
Watson;
Google
Knowledge-based
and
Hybrid
approaches
IBM
Watson;
Apple
Siri;
Wolfram
Alpha;
True
Knowledge
Evi
8
Dan
Jurafsky
9
Dan
Jurafsky
10
Dan
Jurafsky
IR-based
Factoid
QA
Document
DocumentDocument
Document
Document Document
Indexing Answer
Passage
Question Retrieval
Processing Docume
Docume
Query Document nt
Docume
nt
Docume
nt
Passage Answer
Docume
Formulation Retrieval Relevant
nt
nt Retrieval passages Processing
Question Docs
Answer Type
Detection
11
Dan
Jurafsky
IR-based
Factoid
QA
QUESTION
PROCESSING
Detect
ques+on
type,
answer
type,
focus,
rela+ons
Formulate
queries
to
send
to
a
search
engine
PASSAGE
RETRIEVAL
Retrieve
ranked
documents
Break
into
suitable
passages
and
rerank
ANSWER
PROCESSING
Extract
candidate
answers
Rank
candidates
using
evidence
from
the
text
and
external
sources
Dan
Jurafsky
13
Dan
Jurafsky
14
Question
Answering
What
is
Ques+on
Answering?
Question
Answering
Answer
Types
and
Query
Formula+on
Dan
Jurafsky
Factoid
Q/A
Document
DocumentDocument
Document
Document Document
Indexing Answer
Passage
Question Retrieval
Processing Docume
Docume
Query Document nt
Docume
nt
Docume
nt
Passage Answer
Docume
Formulation Retrieval Relevant
nt
nt Retrieval passages Processing
Question Docs
Answer Type
Detection
17
Dan
Jurafsky
Ques%on
Processing
Things
to
extract
from
the
ques%on
Answer
Type
Detec+on
Decide
the
named
en%ty
type
(person,
place)
of
the
answer
Query
Formula+on
Choose
query
keywords
for
the
IR
system
Ques+on
Type
classica+on
Is
this
a
deni+on
ques+on,
a
math
ques+on,
a
list
ques+on?
Focus
Detec+on
Find
the
ques+on
words
that
are
replaced
by
the
answer
Rela+on
Extrac+on
18
Find
rela+ons
between
en++es
in
the
ques+on
Dan
Jurafsky
Question Processing
Theyre the two states you could be reentering if youre crossing
Floridas northern border
19
Dan
Jurafsky
6
coarse
classes
ABBEVIATION,
ENTITY,
DESCRIPTION,
HUMAN,
LOCATION,
NUMERIC
50
ner
classes
LOCATION:
city,
country,
mountain
HUMAN:
group,
individual,
+tle,
descrip+on
ENTITY:
animal,
body,
color,
currency
21
Dan
Jurafsky
Answer Types
23
Dan
Jurafsky
24
Dan
Jurafsky
25
Dan
Jurafsky
Hand-wrioen
rules
Machine
Learning
Hybrids
Dan
Jurafsky
29
Dan
Jurafsky
Factoid
Q/A
Document
DocumentDocument
Document
Document Document
Indexing Answer
Passage
Question Retrieval
Processing Docume
Docume
Query Document nt
Docume
nt
Docume
nt
Passage Answer
Docume
Formulation Retrieval Relevant
nt
nt Retrieval passages Processing
Question Docs
Answer Type
Detection
30
Dan
Jurafsky
1 1
4 4
7
cyberspace/1 Neuromancer/1 term/4 novel/4 coined/7
32
Question
Answering
Answer
Types
and
Query
Formula+on
Question
Answering
Passage
Retrieval
and
Answer
Extrac+on
Dan
Jurafsky
Factoid
Q/A
Document
DocumentDocument
Document
Document Document
Indexing Answer
Passage
Question Retrieval
Processing Docume
Docume
Query Document nt
Docume
nt
Docume
nt
Passage Answer
Docume
Formulation Retrieval Relevant
nt
nt Retrieval passages Processing
Question Docs
Answer Type
Detection
35
Dan
Jurafsky
Passage
Retrieval
Step
1:
IR
engine
retrieves
documents
using
query
terms
Step
2:
Segment
the
documents
into
shorter
units
something
like
paragraphs
Step
3:
Passage
ranking
Use
answer
type
to
help
rerank
passages
36
Dan
Jurafsky
Factoid
Q/A
Document
DocumentDocument
Document
Document Document
Indexing Answer
Passage
Question Retrieval
Processing Docume
Docume
Query Document nt
Docume
nt
Docume
nt
Passage Answer
Docume
Formulation Retrieval Relevant
nt
nt Retrieval passages Processing
Question Docs
Answer Type
Detection
38
Dan
Jurafsky
Answer
Extrac%on
Run
an
answer-type
named-en+ty
tagger
on
the
passages
Each
answer
type
requires
a
named-en+ty
tagger
that
detects
it
If
answer
type
is
CITY,
tagger
has
to
tag
CITY
Can
be
full
NER,
simple
regular
expressions,
or
hybrid
Return
the
string
with
the
right
type:
Who is the prime minister of India (PERSON)
Manmohan Singh, Prime Minister of India, had told
left leaders that the deal would not be renegotiated.!
How tall is Mt. Everest? (LENGTH)
The official height of Mount Everest is 29035 feet!
Dan
Jurafsky
Rela%on
Extrac%on
Answers:
Databases
of
Rela+ons
born-in(Emma
Goldman,
June
27
1869)
author-of(Cao
Xue
Qin,
Dream
of
the
Red
Chamber)
Draw
from
Wikipedia
infoboxes,
DBpedia,
FreeBase,
etc.
Ques+ons:
Extrac+ng
Rela+ons
in
Ques+ons
Whose
granddaughter
starred
in
E.T.?
(acted-in ?x E.T.)!
47
(granddaughter-of ?x ?y)!
Dan
Jurafsky
Temporal
Reasoning
Rela+on
databases
(and
obituaries,
biographical
dic+onaries,
etc.)
IBM
Watson
In
1594
he
took
a
job
as
a
tax
collector
in
Andalusia
Candidates:
Thoreau
is
a
bad
answer
(born
in
1817)
Cervantes
is
possible
(was
alive
in
1594)
48
Dan
Jurafsky
Geospa%al
knowledge
(containment,
direc%onality,
borders)
Beijing
is
a
good
answer
for
Asian
city
California
is
southwest
of
Montana
geonames.org:
49
Dan
Jurafsky