50
© Johan Bos November 2005 Carol Beer (Little Britain)

Carol Beer (Little Britain)

  • Upload
    lexi

  • View
    26

  • Download
    0

Embed Size (px)

DESCRIPTION

Carol Beer (Little Britain). Computer says “no”. Question Answering. Lecture 1 (Today): Introduction; History of QA; Architecture of a QA system; Evaluation. Lecture 2 (Friday): Question Classification; NLP techniques for question analysis; POS-tagging; Parsing; Semantic analysis; WordNet. - PowerPoint PPT Presentation

Citation preview

Page 1: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Carol Beer (Little Britain)

Page 2: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Computer says “no”

Page 3: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Question Answering

• Lecture 1 (Today):Introduction; History of QA; Architecture of a QA system; Evaluation.

• Lecture 2 (Friday):Question Classification; NLP techniques for question analysis; POS-tagging; Parsing; Semantic analysis; WordNet.

• Lecture 3 (Next Monday):Retrieving Answers; Document pre-processing; Tokenisation; Stemming; Lemmatisation; Named Entity Recognition; Anaphora Resolution; Matching; Use of knowledge resources; Reranking; Sanity checking.

Page 4: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

What is Question Answering?

?

Page 5: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Information Pinpointing

Information required: Average number of car accidents per year in Sweden.

Two ways of getting this information:- Ask Google or a similar search engine

(good luck!)- Ask a QA system the question:

What’s the rate of car accidents in Sweden?

Page 6: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

QA vs IR

• Traditional method for information access: IR (Information Retrieval)

– Think of IR as finding the “right book in a library”

– Think of QA as a “librarian giving you the book and opening it on the page with the information you’re looking for”

Page 7: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

QA vs IE

• Traditional method for information access: IE (Information Extraction)

– Think of IE as finding answers to a pre-defined question (i.e., a template)

– Think of QA as asking any question you like

Page 8: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

What is Question Answering?

• Questions in natural language, not queries!

• Answers, not documents!

Page 9: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Why do we need QA?

• Information overload problem• Accessing information using traditional

methods such as IR and IE are limited• QA increasingly important because:

– Size of available information grows– There is duplicate information– There is false information– More and more “computer illiterates”

accessing electronically stored information

Page 10: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Information Avalanche

• Available information is growing*:– 1999: 250MB pp for each person on earth– 2002: 800MB pp for each person on earth

• People want specific information

* source: M.de Rijke 2005

Page 11: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

People ask Questions*

* source: M.de Rijke 2005

Page 12: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Why is QA hard? (1/3)

• Questions are expressed in natural language (such as English or Italian)

• Unlike formal languages, natural languages allow a great deal of flexibility

• Example:– What is the population of Rome?– How many people live in Rome?– What’s the size of Rome?– How many inhabitants does Rome have?

Page 13: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Why is QA hard? (2/3)

• Answers are expressed in natural language (such as English or Italian)

• Unlike formal languages, natural languages allow a great deal of flexibility

• Example:…is estimated at 2.5 million residents… … current population of Rome is 2817000……Rome housed over 1 million inhabitants…

Page 14: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Why is QA hard? (3/3)

• Answers could be spread across different documents

• Examples:– Which European countries produce wine?

[Document A contains information about Italy, and document B about France]

– What does Bill Clinton’s wife do for a living?[Document A explains that Bill Clinton’s wife is Hillary Clinton, and Document B tells us that she’s a politician]

Page 15: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

History of QA (de Rijke & Webber 2003)

• QA is by no means a new area!• Simmons (1965) reviews 15

implemented and working systems• Many ingredients of today’s QA

systems are rooted in these early approaches

• Database oriented systems, domain independent, as opposed to today’s systems that work on large sets of unstructured texts

Page 16: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Examples of early QA systems

• BASEBALL (Green et al. 1963)Answers English questions about scores, locations and dates of baseball games

• LUNAR (Woods 1977)Accesses chemical data on lunar material compiled during the Apollo missions

• PHLIQA1 (Scha et al. 1980)Answers short questions against a database of computer installations in Europe

Page 17: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Recent work in QA

• Since the 1990s research in QA has by and large focused on open-domain applications

• Recently interest in restricted-domain QA has increased, in particular in commercial applications– Banking, entertainment, etc.

Page 18: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Architecture of a QA system

IRQuestion Analysis

query

Document Analysis

Answer Extraction

question

answer-type

question representation

documents/passages

passage representation

corpus

answers

Page 19: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Question Analysis

• Input:Natural Language Question

• Output:Expected Answer Type(Formal) Representation of Question

• Techniques used:Machine learning, parsing

Page 20: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Document Analysis

• Input:Documents or Passages

• Output:(Formal) Representation of Passages that might contain the answer

• Techniques used:Tokenisation, Named Entity Recognition, Parsing

Page 21: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Answer Retrieval

• Input:Expected Answer TypeQuestion (formal representation)Passages (formal representation)

• Output:Ranked list of answers

• Techniques used:Matching, Re-ranking, Validation

Page 22: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Example Run

IRQuestion Analysis

query

Document Analysis

Answer Extraction

question

answer-type

question representation

documents/passages

passage representation

corpus

answers

Page 23: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Example Run

IRQuestion Analysis

query

Document Analysis

Answer Extraction

question

answer-type

question representation

documents/passages

passage representation

corpus

answers

How long is the river Thames?

Page 24: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Example Run

IRQuestion Analysis

query

Document Analysis

Answer Extraction

question

answer-type

question representation

documents/passages

passage representation

corpus

answers

length river thames

Page 25: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Example Run

IRQuestion Analysis

query

Document Analysis

Answer Extraction

question

answer-type

question representation

documents/passages

passage representation

corpus

answers

MEASURE

Page 26: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Example Run

IRQuestion Analysis

query

Document Analysis

Answer Extraction

question

answer-type

question representation

documents/passages

passage representation

corpus

answers

Answer(x) & length(y,x) & river(y) & named(y,thames)

Page 27: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Example Run

IRQuestion Analysis

query

Document Analysis

Answer Extraction

question

answer-type

question representation

documents/passages

passage representation

corpus

answers

A: NYT199802-31B: APW199805-12C: NYT200011-07

Page 28: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Example Run

IRQuestion Analysis

query

Document Analysis

Answer Extraction

question

answer-type

question representation

documents/passages

passage representation

corpus

answers

A: 30(u) & mile(u) & length(v,u) & river(y)

B: 60(z) & centimeter(z) & height(v,z) & dog(z)

C: 230(u) & kilometer(u) & length(x,u) & river(x)

Page 29: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Example Run

IRQuestion Analysis

query

Document Analysis

Answer Extraction

question

answer-type

question representation

documents/passages

passage representation

corpus

answers

C: 230 kilometerA: 30 milesB: 60 centimeter

Page 30: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Evaluating QA systems

• International evaluation campaigns for QA systems (open domain QA):– TREC (Text Retrieval Conference)

http://trec.nist.gov/– CLEF (Cross Language Evaluation Forum)

http://clef-qa.itc.it/– NTCIR (NII Test Collection for IR Systems)

http://www.slt.atr.jp/CLQA/

Page 31: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

TREC-QA (organised by NIST)

• Annual event, started in 1999• Difficulty of the QA task increased over

the years:– 1999: Answers in snippets, ranked list of

answers;– 2005: Exact answers, only one answer.

• Three types of questions:– Factoid questions– List questions– Definition questions

Page 32: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

QA@CLEF

• CLEF is the “European edition” of TREC• Monolingual (non-English) QA

– Bulgarian (BG), German (DE), Spanish (ES), Finnish (FI), French (FR), Italian (IT), Dutch (NL), Portuguese (PT)

• Cross-Lingual QA – Questions posed in source language, answer

searched in documents of target language – All combinations possible

Page 33: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Open-Domain QA

• QA at TREC is considered “Open-Domain” QA – Document collection is Acquint Corpus

(over a million documents)– Questions can be about anything

• Restricted-Domain QA– Documents described a specific domain– Detailed questions– Less redundancy of answers!

Page 34: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

TREC-type questions

• Factoid questions– Where is the Taj Mahal?

• List questions– What actors have played Tevye in

`Fiddler on the Roof'?• Definition/biographical questions

– What is a golden parachute?– Who is Vlad the Impaler?

Page 35: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

What is a correct answer?

• Example Factoid Question– When did Franz Kafka die?

• Possible Answers:– Kafka died in 1923.– Kafka died in 1924.– Kafka died on June 3, 1924 from

complications related to Tuberculosis.– Ernest Watz was born June 3, 1924.– Kafka died on June 3, 1924.

Page 36: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

What is a correct answer?

• Example Factoid Question– When did Franz Kafka die?

• Possible Answers:– Kafka died in 1923.– Kafka died in 1924.– Kafka died on June 3, 1924 from

complications related to Tuberculosis.– Ernest Watz was born June 3, 1924.– Kafka died on June 3, 1924.

Incorrect

Page 37: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

What is a correct answer?

• Example Factoid Question– When did Franz Kafka die?

• Possible Answers:– Kafka died in 1923.– Kafka died in 1924.– Kafka died on June 3, 1924 from

complications related to Tuberculosis.– Ernest Watz was born June 3, 1924.– Kafka died on June 3, 1924.

Inexact(under-informative)

Page 38: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

What is a correct answer?

• Example Question– When did Franz Kafka die?

• Possible Answers:– Kafka died in 1923.– Kafka died in 1924.– Kafka died on June 3, 1924 from

complications related to Tuberculosis.– Ernest Watz was born June 3, 1924.– Kafka died on June 3, 1924.

Inexact(over-informative)

Page 39: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

What is a correct answer?

• Example Question– When did Franz Kafka die?

• Possible Answers:– Kafka died in 1923.– Kafka died in 1924.– Kafka died on June 3, 1924 from

complications related to Tuberculosis.– Ernest Watz was born June 3, 1924.– Kafka died on June 3, 1924.

Unsupported

Page 40: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

What is a correct answer?

• Example Question– When did Franz Kafka die?

• Possible Answers:– Kafka died in 1923.– Kafka died in 1924.– Kafka died on June 3, 1924 from

complications related to Tuberculosis.– Ernest Watz was born June 3, 1924.– Kafka died on June 3, 1924.

Correct

Page 41: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Answer Accuracy

# correct answersAnswer Accuracy = --------------------------- # questions

Page 42: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Correct answers to list questions

System A:

France Italy

Example List Question Which European countries produce wine?

System B:

Scotland France Germany Italy Spain Iceland Greece the Netherlands Japan Turkey Estonia

Page 43: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Evaluation metrics for list questions

• Precision (P): # answers judged correct & distinct P = ---------------------------------------------- # answers returned

• Recall (R): # answers judged correct & distinct R = ------------------------------------------------ # total answers

• F-Score (F): 2*P*R F = ------------ P+R

Page 44: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Correct answers to list questions

System A:

France Italy

Example List Question Which European countries produce wine?

System B:

Scotland France Germany Italy Spain Iceland Greece the Netherlands Japan Turkey Estonia

P = 1.00R = 0.25F = 0.40

P = 0.64R = 0.88F = 0.74

Page 45: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Other evaluation metrics

System A: Ranked answers (Accuracy = 0.2) Q1 Q2 Q3 Q4 Q6 Q7 Q8 Q9 …. Qn

A1 W W C W C W W W …. WA2 W W W W W W W W …. WA3 W W W W W W W W …. WA4 W W W W W W W W …. WA5 W C W W W C W W …. W

System B: Ranked answers (Accuracy = 0.1) Q1 Q2 Q3 Q4 Q6 Q7 Q8 Q9 …. Qn

A1 W W W W C W W W …. WA2 C W C W W C C W …. CA3 W C W W W W W W …. WA4 W W W C W W W W …. WA5 W W W W W W W W …. W

Page 46: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Mean Reciprocal Rank (MRR)

• Score for an individual question:– The reciprocal of the rank at which

the first correct answer is returned – 0 if no correct response is returned

• The score for a run: – Mean over the set of questions in the test

Page 47: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

MRR in action

System A: MRR = (.2+1+1+.2)/10 = 0.24 Q1 Q2 Q3 Q4 Q6 Q7 Q8 Q9 …. Qn

A1 W W C W C W W W …. WA2 W W W W W W W W …. WA3 W W W W W W W W …. WA4 W W W W W W W W …. WA5 W C W W W C W W …. W

System B: MRR = (.5+.33+.5+.25+1+.5+.5+.5)/10=0.42 Q1 Q2 Q3 Q4 Q6 Q7 Q8 Q9 …. Qn

A1 W W W W C W W W …. WA2 C W C W W C C W …. CA3 W C W W W W W W …. WA4 W W W C W W W W …. WA5 W W W W W W W W …. W

Page 48: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Open-Domain Question Answering

• TREC QA Track– Factoid questions– List questions– Definition questions

• State-of-the-Art– Hard problem– Only few systems with

good results

Accuracy TREC 2004 (n=28)

0 10

0.0-0.1

0.2-0.3

0.4-0.5

0.6-0.7

Page 49: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5

Friday

• QA Lecture 2:– Question Classification– NLP techniques for question analysis– POS-tagging– Parsing– Semantic analysis– Use of lexical resources such as WordNet

Page 50: Carol Beer (Little Britain)

© J

ohan

Bos

Nov

embe

r 200

5Question Classification

(preview)• How many islands does Italy have?• When did Inter win the Scudetto?• What are the colours of the Lithuanian flag?• Where is St. Andrews located?• Why does oil float in water?• How did Frank Zappa die?• Name the Baltic countries.• Which seabird was declared extinct in the 1840s?• Who is Noam Chomsky?• List names of Russian composers.• Edison is the inventor of what?• How far is the moon from the sun?• What is the distance from New York to Boston?• How many planets are there?• What is the exchange rate of the Euro to the Dollar?• What does SPQR stand for?• What is the nickname of Totti?• What does the Scottish word “bonnie” mean?• Who wrote the song “Paranoid Android”?