CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 36,37–Part of Speech Tagging and HMM 21 st and 25 th Oct, 2010 (forward,

Slides:



Advertisements
Similar presentations
School of something FACULTY OF OTHER School of Computing FACULTY OF ENGINEERING Chunking: Shallow Parsing Eric Atwell, Language Research Group.
Advertisements

School of something FACULTY OF OTHER School of Computing FACULTY OF ENGINEERING PoS-Tagging theory and terminology COMP3310 Natural Language Processing.
CS344 : Introduction to Artificial Intelligence
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 2 (06/01/06) Prof. Pushpak Bhattacharyya IIT Bombay Part of Speech (PoS)
CS626: NLP, Speech and the Web
CPSC 422, Lecture 16Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 16 Feb, 11, 2015.
Parts of Speech Generally speaking, the “grammatical type” of word: –Verb, Noun, Adjective, Adverb, Article, … We can also include inflection: –Verbs:
BİL711 Natural Language Processing
Part-of-speech tagging. Parts of Speech Perhaps starting with Aristotle in the West (384–322 BCE) the idea of having parts of speech lexical categories,
Part of Speech Tagging Importance Resolving ambiguities by assigning lower probabilities to words that don’t fit Applying to language grammatical rules.
Natural Language Processing Lecture 8—9/24/2013 Jim Martin.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 29– AI and Probability (exemplified through NLP) 4 th Oct, 2010.
CS460/449 : Speech, Natural Language Processing and the Web/Topics in AI Programming (Lecture 2– Introduction+ML and NLP) Pushpak Bhattacharyya CSE Dept.,
CS626 : Natural Language Processing, Speech and the Web (Lecture 1,2,3 – Introduction, POS tagging) Pushpak Bhattacharyya CSE Dept., IIT Bombay 19 th,
Part of Speech Tagging with MaxEnt Re-ranked Hidden Markov Model Brian Highfill.
POS Tagging & Chunking Sambhav Jain LTRC, IIIT Hyderabad.
Tagging with Hidden Markov Models. Viterbi Algorithm. Forward-backward algorithm Reading: Chap 6, Jurafsky & Martin Instructor: Paul Tarau, based on Rada.
Part II. Statistical NLP Advanced Artificial Intelligence Part of Speech Tagging Wolfram Burgard, Luc De Raedt, Bernhard Nebel, Lars Schmidt-Thieme Most.
1 Introduction to Computational Natural Language Learning Linguistics (Under: Topics in Natural Language Processing ) Computer Science (Under:
Ch 10 Part-of-Speech Tagging Edited from: L. Venkata Subramaniam February 28, 2002.
POS based on Jurafsky and Martin Ch. 8 Miriam Butt October 2003.
Introduction to Syntax, with Part-of-Speech Tagging Owen Rambow September 17 & 19.
Part of speech (POS) tagging
Word classes and part of speech tagging Chapter 5.
Albert Gatt Corpora and Statistical Methods Lecture 9.
Part II. Statistical NLP Advanced Artificial Intelligence Applications of HMMs and PCFGs in NLP Wolfram Burgard, Luc De Raedt, Bernhard Nebel, Lars Schmidt-Thieme.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 21- Forward Probabilities and Robotic Action Sequences.
CS : Speech, Natural Language Processing and the Web/Topics in Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 12: Deeper.
Part of Speech Tagging & Hidden Markov Models Mitch Marcus CSE 391.
1 Statistical Parsing Chapter 14 October 2012 Lecture #9.
CS460/626 : Natural Language Processing/Speech, NLP and the Web (Lecture 13, 14–Argmax Computation) Pushpak Bhattacharyya CSE Dept., IIT Bombay 3 rd and.
Fall 2005 Lecture Notes #8 EECS 595 / LING 541 / SI 661 Natural Language Processing.
CS : Language Technology for the Web/Natural Language Processing Pushpak Bhattacharyya CSE Dept., IIT Bombay Constituent Parsing and Algorithms (with.
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 3 (10/01/06) Prof. Pushpak Bhattacharyya IIT Bombay Statistical Formulation.
Hindi Parts-of-Speech Tagging & Chunking Baskaran S MSRI.
CS626: NLP, Speech and the Web Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 15, 17: Parsing Ambiguity, Probabilistic Parsing, sample seminar 17.
CS774. Markov Random Field : Theory and Application Lecture 19 Kyomin Jung KAIST Nov
10/30/2015CPSC503 Winter CPSC 503 Computational Linguistics Lecture 7 Giuseppe Carenini.
Word classes and part of speech tagging Chapter 5.
CSA2050: Introduction to Computational Linguistics Part of Speech (POS) Tagging I Introduction Tagsets Approaches.
CS : Speech, NLP and the Web/Topics in AI Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture-16: Probabilistic parsing; computing probability of.
POS tagging and Chunking for Indian Languages Rajeev Sangal and V. Sriram, International Institute of Information Technology, Hyderabad.
CSA3202 Human Language Technology HMMs for POS Tagging.
CPSC 422, Lecture 15Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 15 Oct, 14, 2015.
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 24 (14/04/06) Prof. Pushpak Bhattacharyya IIT Bombay Word Sense Disambiguation.
CS : Speech, NLP and the Web/Topics in AI Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture-14: Probabilistic parsing; sequence labeling, PCFG.
CS621: Artificial Intelligence
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 1 (03/01/06) Prof. Pushpak Bhattacharyya IIT Bombay Introduction to Natural.
Part-of-speech tagging
LING/C SC/PSYC 438/538 Lecture 18 Sandiway Fong. Adminstrivia Homework 7 out today – due Saturday by midnight.
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 13 (17/02/06) Prof. Pushpak Bhattacharyya IIT Bombay Top-Down Bottom-Up.
Word classes and part of speech tagging. Slide 1 Outline Why part of speech tagging? Word classes Tag sets and problem definition Automatic approaches.
CS : Speech, NLP and the Web/Topics in AI Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture-15: Probabilistic parsing; PCFG (contd.)
Part-of-Speech Tagging & Sequence Labeling Hongning Wang
Word classes and part of speech tagging Chapter 5.
Part-of-Speech Tagging CSCI-GA.2590 – Lecture 4 Ralph Grishman NYU.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 6-7: Hidden Markov Model 18.
CS460/626 : Natural Language Processing/Speech, NLP and the Web (Lecture 25– Probabilistic Parsing) Pushpak Bhattacharyya CSE Dept., IIT Bombay 14 th March,
Tasneem Ghnaimat. Language Model An abstract representation of a (natural) language. An approximation to real language Assume we have a set of sentences,
Natural Language Processing Vasile Rus
Lecture 9: Part of Speech
Pushpak Bhattacharyya CSE Dept., IIT Bombay
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 15
CS : Speech, NLP and the Web/Topics in AI
CSCI 5832 Natural Language Processing
CSCI 5832 Natural Language Processing
CS621: Artificial Intelligence
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 15
Classical Part of Speech (PoS) Tagging
Natural Language Processing
Presentation transcript:

CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 36,37–Part of Speech Tagging and HMM 21 st and 25 th Oct, 2010 (forward, backward computation and Baum Welch Algorithm will be done later)

Part of Speech Tagging POS Tagging is a process that attaches each word in a sentence with a suitable grammar tag (noun, verb etc.) from a given set of tags. The set of tags is called the Tag-set. Standard Tag-set : Penn Treebank (for English).

POS: A kind of sequence labeling task Other such tasks Marking tags on genomic sequences Training for predicting protein structure: labels are primary (P), secondery (S), tertiary (T) Named entity labels Washington_PLACE voted Washington_PERSON to power पूजा _PERS ने पूजा के लिया फूल ख़रीदा (Puja bought flowers for worshipping) Shallow parsing (noun phrase marking) The_B little_I boy_I sprained his_B ring_I finger_I.

POS Tags NN – Noun; e.g. Dog_NN VM – Main Verb; e.g. Run_VM VAUX – Auxiliary Verb; e.g. Is_VAUX JJ – Adjective; e.g. Red_JJ PRP – Pronoun; e.g. You_PRP NNP – Proper Noun; e.g. John_NNP etc.

POS Tag Ambiguity In English: I bank 1 with the bank 2 on the river bank 3. Bank 1 is verb, the other two banks are noun {Aside- generator of humour (incongruity theory)}: A man returns to his parked car and finds the sticker “Parking fine”. He goes and thaks the policeman for appreiating his parking skill. ‏ fine_adverb vs. fine_noun

For Hindi Rama achhaa gaata hai. (hai is VAUX : Auxiliary verb)‏; Ram sings well Rama achha ladakaa hai. (hai is VCOP : Copula verb)‏; Ram is a good boy

Process List all possible tag for each word in sentence. Choose best suitable tag sequence.

Example ”People jump high”. People : Noun/Verb jump : Noun/Verb high : Noun/Verb/Adjective We can start with probabilities.

Challenge of POS tagging Example from Indian Language

Tagging of jo, vaha, kaun and their inflected forms in Hindi and their equivalents in multiple languages

DEM and PRON labels Jo_DEM ladakaa kal aayaa thaa, vaha cricket acchhaa khel letaa hai Jo_PRON kal aayaa thaa, vaha cricket acchhaa khel letaa hai

Disambiguation rule-1 If Jo is followed by noun Then DEM Else …

False Negative When there is arbitrary amount of text between the jo and the noun Jo_??? bhaagtaa huaa, haftaa huaa, rotaa huaa, chennai academy a koching lenevaalaa ladakaa kal aayaa thaa, vaha cricket acchhaa khel letaa hai

False Positive Jo_DEM (wrong!) duniyadarii samajhkar chaltaa hai, … Jo_DEM/PRON? manushya manushyoM ke biich ristoM naatoM ko samajhkar chaltaa hai, … (ambiguous)

False Positive for Bengali Je_DEM (wrong!) bhaalobaasaa paay, sei bhaalobaasaa dite paare (one who gets love can give love) Je_DEM (right!) bhaalobaasa tumi kalpanaa korchho, taa e jagat e sambhab nay (the love that you are image exits, is impossible in this world)

Will fail In the similar situation for Jis, jin, vaha, us, un All these forms add to corpus count

Disambiguation rule-2 If Jo is oblique (attached with ne, ko, se etc. attached) Then It is PRON Else

Will fail (false positive) In case of languages that demand agreement between jo-form and the noun it qualifies E.g. Sanskrit Yasya_PRON (wrong!) baalakasya aananam drshtyaa… (jis ladake kaa muha dekhkar) Yasya_PRON (wrong!) kamaniyasya baalakasya aananam drshtyaa…

Will also fail for Rules that depend on the whether the noun following jo/vaha/kaun or its form is oblique or not Because the case marker can be far from the noun ladakii jise piliya kii bimaarii ho gayiii thii ko … Needs discussions across languages

Remark on DEM and PRON DEM vs. PRON cannot be disambiguated IN GENERAL At the level of the POS tagger i.e. Cannot assume parsing Cannot assume semantics

Mathematics of POS tagging

Derivation of POS tagging formula Best tag sequence = T* = argmax P(T|W) = argmax P(T)P(W|T)(by Baye’s Theorem) P(T) = P(t 0 =^ t 1 t 2 … t n+1 =.) = P(t 0 )P(t 1 |t 0 )P(t 2 |t 1 t 0 )P(t 3 |t 2 t 1 t 0 ) … P(t n |t n-1 t n-2 …t 0 )P(t n+1 |t n t n-1 …t 0 ) = P(t 0 )P(t 1 |t 0 )P(t 2 |t 1 ) … P(t n |t n-1 )P(t n+1 |t n ) = P(t i |t i-1 )Bigram Assumption ∏ N+1 i = 0

Lexical Probability Assumption P(W|T) = P(w 0 |t 0 -t n+1 )P(w 1 |w 0 t 0 -t n+1 )P(w 2 |w 1 w 0 t 0 -t n+1 ) … P(w n |w 0 -w n-1 t 0 -t n+1 )P(w n+1 |w 0 -w n t 0 -t n+1 ) Assumption: A word is determined completely by its tag. This is inspired by speech recognition = P(w o |t o )P(w 1 |t 1 ) … P(w n+1 |t n+1 ) = P(w i |t i ) = P(w i |t i )(Lexical Probability Assumption) ∏ n+1 i = 0 ∏ n+1 i = 1

Generative Model ^_^People_NJump_VHigh_R._. ^N V V N N A N. Lexical Probabilities Bigram Probabilities This model is called Generative model. Here words are observed from tags as states. This is similar to HMM. AA

Parts of Speech Tags (Simplified situation) Noun (N)– boy Verb (V)– sing Adjective (A)—red Adverb (R)– loudly Preposition (P)—to Article (T)– a, an Conjunction (C)– and Wh-word (W)– who Pronoun (U)--he

Hidden Markov Model and POS tagging Parts of Speech tags are states Words are observation S={N,V,A,R,P,C,T,W,U} O={Words of language}

Example Test sentence “^ People laugh aloud $”

Transition Table Tag\tagNVAR…U N# /#N V# /#V A R U

Lexical or Word Probabilities Tag\wordsBuyApplePeopleGoing… N# /#N V# /#V A R U

Corpus Collection of coherent text ^_^ People_N laugh_V aloud_A $_$ Corpus SpokenWritten Switchboard Corpus BrownBNC