Metodi statistici nella linguistica computazionale The Bayesian approach to spelling correction.

Slides:



Advertisements
Similar presentations
LING 438/538 Computational Linguistics Sandiway Fong Lecture 17: 10/25.
Advertisements

Normalizing Microtext Zhenzhen Xue, Dawei Yin and Brian D. Davison Lehigh University.
Hidden Markov Models Reading: Russell and Norvig, Chapter 15, Sections
A BAYESIAN APPROACH TO SPELLING CORRECTION. ‘Noisy channels’ In a number of tasks involving natural language, the problem can be viewed as recovering.
Maximum Likelihood. Likelihood The likelihood is the probability of the data given the model.
Pattern Recognition and Machine Learning
6/9/2015CPSC503 Winter CPSC 503 Computational Linguistics Lecture 4 Giuseppe Carenini.
6/9/2015CPSC503 Winter CPSC 503 Computational Linguistics Lecture 4 Giuseppe Carenini.
September BASIC TECHNIQUES IN STATISTICAL NLP Word prediction n-grams smoothing.
458 More on Model Building and Selection (Observation and process error; simulation testing and diagnostics) Fish 458, Lecture 15.
CS 4705 Lecture 13 Corpus Linguistics I. From Knowledge-Based to Corpus-Based Linguistics A Paradigm Shift begins in the 1980s –Seeds planted in the 1950s.
CS 4705 Probabilistic Approaches to Pronunciation and Spelling.
CS 4705 Lecture 5 Probabilistic Approaches to Pronunciation and Spelling.
Gobalisation Week 8 Text processes part 2 Spelling dictionaries Noisy channel model Candidate strings Prior probability and likelihood Lab session: practising.
1 Confidence Interval for the Population Mean. 2 What a way to start a section of notes – but anyway. Imagine you are at the ground level in front of.
Computational Language Andrew Hippisley. Computational Language Computational language and AI Language engineering: applied computational language Case.
Spelling Checkers Daniel Jurafsky and James H. Martin, Prentice Hall, 2000.
CS276 – Information Retrieval and Web Search Checking in. By the end of this week you need to have: Watched the online videos corresponding to the first.
1 Statistical NLP: Lecture 13 Statistical Alignment and Machine Translation.
Introduction to Information Retrieval Introduction to Information Retrieval CS276: Information Retrieval and Web Search Christopher Manning, Pandu Nayak.
BİL711 Natural Language Processing1 Statistical Language Processing In the solution of some problems in the natural language processing, statistical techniques.
Copyright © 2010 Pearson Education, Inc. Chapter 22 Comparing Two Proportions.
Conditional & Joint Probability A brief digression back to joint probability: i.e. both events O and H occur Again, we can express joint probability in.
November 2005CSA3180: Statistics III1 CSA3202: Natural Language Processing Statistics 3 – Spelling Models Typing Errors Error Models Spellchecking Noisy.
Chapter 6.7 Determinants. In this chapter all matrices are square; for example: 1x1 (what is a 1x1 matrix, in fact?), 2x2, 3x3 Our goal is to introduce.
Chapter 8: Systems analysis and design
LING 438/538 Computational Linguistics
1 TEMPLATE MATCHING  The Goal: Given a set of reference patterns known as TEMPLATES, find to which one an unknown pattern matches best. That is, each.
Intro to NLP - J. Eisner1 Finite-State and the Noisy Channel.
Chapter 5. Probabilistic Models of Pronunciation and Spelling 2007 년 05 월 04 일 부산대학교 인공지능연구실 김민호 Text : Speech and Language Processing Page. 141 ~ 189.
LING/C SC/PSYC 438/538 Lecture 19 Sandiway Fong. Administrivia Next Monday – guest lecture from Dr. Jerry Ball of the Air Force Research Labs to be continued.
Statistical NLP: Lecture 8 Statistical Inference: n-gram Models over Sparse Data (Ch 6)
1 CSA4050: Advanced Topics in NLP Spelling Models.
Extending the Definition of Exponents © Math As A Second Language All Rights Reserved next #10 Taking the Fear out of Math 2 -8.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Deterministic vs. Random Maximum A Posteriori Maximum Likelihood Minimum.
Language Modeling Anytime a linguist leaves the group the recognition rate goes up. (Fred Jelinek)
9-1 MGMG 522 : Session #9 Binary Regression (Ch. 13)
IRCS/CCN Summer Workshop June 2003 Speech Recognition.
CS276: Information Retrieval and Web Search
Chapter 5: Spell Checking
Large Vocabulary Continuous Speech Recognition. Subword Speech Units.
1 Introduction to Natural Language Processing ( ) Language Modeling (and the Noisy Channel) AI-lab
12/7/2015CPSC503 Winter CPSC 503 Computational Linguistics Lecture 4 Giuseppe Carenini.
A COMPARISON OF HAND-CRAFTED SEMANTIC GRAMMARS VERSUS STATISTICAL NATURAL LANGUAGE PARSING IN DOMAIN-SPECIFIC VOICE TRANSCRIPTION Curry Guinn Dave Crist.
Presented by: Fang-Hui Chu Discriminative Models for Speech Recognition M.J.F. Gales Cambridge University Engineering Department 2007.
1 Minimum Error Rate Training in Statistical Machine Translation Franz Josef Och Information Sciences Institute University of Southern California ACL 2003.
Lecture 3: MLE, Bayes Learning, and Maximum Entropy
Autumn Web Information retrieval (Web IR) Handout #3:Dictionaries and tolerant retrieval Mohammad Sadegh Taherzadeh ECE Department, Yazd University.
WNSpell: A WordNet-Based Spell Corrector BILL HUANG PRINCETON UNIVERSITY Global WordNet Conference 2016Bucharest, Romania.
January 2012Spelling Models1 Human Language Technology Spelling Models.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 9 Testing a Claim 9.1 Significance Tests:
LING/C SC/PSYC 438/538 Lecture 24 Sandiway Fong 1.
ECE 8443 – Pattern Recognition ECE 8527 – Introduction to Machine Learning and Pattern Recognition Objectives: Bayes Rule Mutual Information Conditional.
Tasneem Ghnaimat. Language Model An abstract representation of a (natural) language. An approximation to real language Assume we have a set of sentences,
Questionnaire-Part 2. Translating a questionnaire Quality of the obtained data increases if the questionnaire is presented in the respondents’ own mother.
Spell checking. Spelling Correction and Edit Distance Non-word error detection: – detecting “graffe” “ سوژن ”, “ مصواک ”, “ مداا ” Non-word error correction:
Tolerant Retrieval Some of these slides are based on Stanford IR Course slides at 1.
Spelling correction. Spell correction Two principal uses Correcting document(s) being indexed Retrieve matching documents when query contains a spelling.
Spelling Correction and the Noisy Channel Real-Word Spelling Correction.
Statistical NLP: Lecture 13
Sections 6-4 & 7-5 Estimation and Inferences Variation
Where did we stop? The Bayes decision rule guarantees an optimal classification… … But it requires the knowledge of P(ci|x) (or p(x|ci) and P(ci)) We.
CS621/CS449 Artificial Intelligence Lecture Notes
CSA3180: Natural Language Processing
CPSC 503 Computational Linguistics
Lecture 13 Corpus Linguistics I CS 4705.
CPSC 503 Computational Linguistics
CS276: Information Retrieval and Web Search
CS621/CS449 Artificial Intelligence Lecture Notes
Presentation transcript:

Metodi statistici nella linguistica computazionale The Bayesian approach to spelling correction

‘Noisy channels’ In a number of tasks involving natural language, the problem can be viewed as recovering an ‘original signal’ distorted by a `noisy channel’: – Speech recognition – Spelling correction – OCR / handwriting recognition – (less felicitously perhaps): pronunciation variation This metaphor has provided the justification for the Bayesian approach to statistical NLP,which has found application also outside these application areas

Spelling Errors They are leaving in about fifteen minuets to go to her house The study was conducted mainly be John Black. The design an construction of the system will take more than one year. Hopefully, all with continue smoothly in my absence. Can they lave him my messages? I need to notified the bank of this problem. He is trying to fine out.

Handwriting recognition From Woody Allen’s Take the Money and Run (1969) – Allen (a bank robber), walks up to the teller and hands her a note that reads. "I have a gun. Give me all your cash." The teller, however, is puzzled, because he reads "I have a gub." "No, it's gun", Allen says. "Looks like 'gub' to me," the teller says, then asks another teller to help him read the note, then another, and finally everyone is arguing over what the note means.

Spelling errors How common are spelling errors? –.005% in carefully edited newswire – 1-3% in `normal’ human written text – 38% in applications like directory lookup – Handwriting recognition errors: Apple Newton: 2-3% Damerau (1964): 80% of all misspelled words (non- word errors) caused by SINGLE-ERROR MISSPELLINGS: – INSERTION: the  ther – DELETION: the  th – SUBSTITUTION: the  thw – TRANSPOSITION: the  hte

Dealing with spelling errors (Kukich, 1992) 3 increasingly broader problems: – NON-WORD ERROR DETECTION: ‘graffe’ instead of ‘giraffe’ – ISOLATED WORD-ERROR CORRECTION: replacing ‘graffe’ with ‘giraffe’ without looking at context – CONTEXT-DEPENDENT ERROR DETECTION / CORRECTION: detecting also spelling errors that result in a real world

Detecting non-word errors: Dictionaries Peterson, 1986: large dictionaries may do more damage than good – wont – veery Damerau and Mays (1989): no evidence this was the case

The Noisy Channel model

Bayesian inference `Bayesian inference’ is the name given to techniques typically used in diagnostics to identify the CAUSE of certain OBSERVATIONS The name ‘Bayesian’ comes from the fact that Bayes’ rule is used to ‘turn around’ a problem: from one of finding statistics about the posterior probability of the CAUSE to one of finding the posterior probability of the OBSERVATIONS

Bayesian inference: the equations (These are equations that we will encounter again and again for different tasks) The statistical formulation of the problem of finding the most likely `explanation’ for the observation: Using Bayes’ Rule, this probability can be `turned around’:

Bayesian equations, 2 Some of these quantities are easy to compute, but others much less so – especially P(O) Fortunately, we don’t really need to compute this term!! (It’s the same for ALL `explanations’) This equation is a pattern that we will encounter again and again.

Applying the Bayesian Method to Spelling: Kernigham et al, 1990 correct takes words rejected by spell and generates a list of potential correct words Two steps: 1. Proposing candidate corrections 2. Scoring the candidates

Proposing candidate corrections Assumption: correct word can be obtained from misspelled one by applying at most one operation (cfr. Damerau, 1964) ErrorCorrectionCorr letterError letter PositionType acressactresst-2del acresscress-a0ins acresscaresscaac0transp acressaccesscr2sub acressacrossoe3sub acressacres-s5ins

Scoring the candidates Choose the correction with the highest probability: P(c): MLE estimation in a 44M words corpus, with smoothing (Kernigham et al used `add.05’) cfreq(c)p(c) actress cress caress access

Confusion matrices Difficult to compute directly, but can be estimated by looking at LOCAL FACTORS only Entry [m,n] in a CONFUSION MATRIX for SUBSTITUTION will tell us how often n is used instead of m Kernighan et al used four confusion matrices: – del[x,y] (number of times x is typed instead of correct xy) – ins[x,y] (number of times xy is typed instead of correct x) – sub[x,y] (number of times y is typed instead of correct x) – trans[x,y] (number of times yx is typed instead of correct xy)

Estimating the likelihood of a typo

More sophisticated methods MINIMUM EDIT DISTANCE: allow for the possibility of more than one problem N-GRAM models: use context (detect ‘real words’)

References Jurafsky and Martin, chapter 5 Kernighan, M. D., Church, K. W., and Gale, W. A. (1990). A spelling correction method based on a noisy channel model. COLING-90, Karen Kukich (1992). Techniques for automatically correcting words in text. ACM Computing Surveys, 24(4),