1 POS Tagging: Introduction Heng Ji Feb 2, 2008 Acknowledgement: some slides from Ralph Grishman, Nicolas Nicolov, J&M.

Slides:



Advertisements
Similar presentations
School of something FACULTY OF OTHER School of Computing FACULTY OF ENGINEERING PoS-Tagging theory and terminology COMP3310 Natural Language Processing.
Advertisements

POS TAGGING AND SYNTACTIC PARSING Heng Ji September 10, 2014.
Outline Why part of speech tagging? Word classes
7 November 2006 University of Tehran Persian POS Tagging Hadi Amiri Database Research Group (DBRG) ECE Department, University of Tehran.
Word Classes and Part-of-Speech (POS) Tagging
Ch 9 Part of Speech Tagging (slides adapted from Dan Jurafsky, Jim Martin, Dekang Lin, Rada Mihalcea, and Bonnie Dorr and Mitch Marcus.) ‏
1 Part of Speech tagging Lecture 9 Slides adapted from: Dan Jurafsky, Julia Hirschberg, Jim Martin.
Chapter 8. Word Classes and Part-of-Speech Tagging From: Chapter 8 of An Introduction to Natural Language Processing, Computational Linguistics, and Speech.
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.
February 2007CSA3050: Tagging II1 CSA2050: Natural Language Processing Tagging 2 Rule-Based Tagging Stochastic Tagging Hidden Markov Models (HMMs) N-Grams.
Natural Language Processing Lecture 8—9/24/2013 Jim Martin.
September PART-OF-SPEECH TAGGING Universita’ di Venezia 1 Ottobre 2003.
LING 388 Language and Computers Lecture 22 11/25/03 Sandiway FONG.
Part II. Statistical NLP Advanced Artificial Intelligence Part of Speech Tagging Wolfram Burgard, Luc De Raedt, Bernhard Nebel, Lars Schmidt-Thieme Most.
1 CSC 594 Topics in AI – Applied Natural Language Processing Fall 2009/ Part-Of-Speech (POS) Tagging.
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Word Classes and English Grammar.
Learning Bit by Bit Hidden Markov Models. Weighted FSA weather The is outside
POS based on Jurafsky and Martin Ch. 8 Miriam Butt October 2003.
LING 388: Language and Computers Sandiway Fong Lecture 23: 11/15.
Tagging – more details Reading: D Jurafsky & J H Martin (2000) Speech and Language Processing, Ch 8 R Dale et al (2000) Handbook of Natural Language Processing,
NLP and Speech 2004 English Grammar
1 PART-OF-SPEECH TAGGING. 2 Topics of the next three lectures Tagsets Rule-based tagging Brill tagger Tagging with Markov models The Viterbi algorithm.
Part-of-Speech Tagging & Sequence Labeling
Word classes and part of speech tagging Chapter 5.
BIOI 7791 Projects in bioinformatics Spring 2005 March 22 © Kevin B. Cohen.
8. Word Classes and Part-of-Speech Tagging 2007 년 5 월 26 일 인공지능 연구실 이경택 Text: Speech and Language Processing Page.287 ~ 303.
Lemmatization Tagging LELA /20 Lemmatization Basic form of annotation involving identification of underlying lemmas (lexemes) of the words in.
Part II. Statistical NLP Advanced Artificial Intelligence Applications of HMMs and PCFGs in NLP Wolfram Burgard, Luc De Raedt, Bernhard Nebel, Lars Schmidt-Thieme.
Parts of Speech Sudeshna Sarkar 7 Aug 2008.
Part of Speech Tagging & Hidden Markov Models Mitch Marcus CSE 391.
Lecture 6 POS Tagging Methods Topics Taggers Rule Based Taggers Probabilistic Taggers Transformation Based Taggers - Brill Supervised learning Readings:
Czech-English Word Alignment Ondřej Bojar Magdalena Prokopová
10/24/2015CPSC503 Winter CPSC 503 Computational Linguistics Lecture 6 Giuseppe Carenini.
10/30/2015CPSC503 Winter CPSC 503 Computational Linguistics Lecture 7 Giuseppe Carenini.
13-1 Chapter 13 Part-of-Speech Tagging POS Tagging + HMMs Part of Speech Tagging –What and Why? What Information is Available? Visible Markov Models.
Word classes and part of speech tagging Chapter 5.
Speech and Language Processing Ch8. WORD CLASSES AND PART-OF- SPEECH TAGGING.
Tokenization & POS-Tagging
CSA2050: Introduction to Computational Linguistics Part of Speech (POS) Tagging I Introduction Tagsets Approaches.
Word classes and part of speech tagging 09/28/2004 Reading: Chap 8, Jurafsky & Martin Instructor: Rada Mihalcea Note: Some of the material in this slide.
Natural Language Processing
Auckland 2012Kilgarriff: NLP and Corpus Processing1 The contribution of NLP: corpus processing.
Part-of-speech tagging
Human Language Technology Part of Speech (POS) Tagging II Rule-based Tagging.
LING/C SC/PSYC 438/538 Lecture 18 Sandiway Fong. Adminstrivia Homework 7 out today – due Saturday by midnight.
1 Computational Lexicology, Morphology and Syntax Course 6 Diana Trandab ă ț Academic year:
Word classes and part of speech tagging. Slide 1 Outline Why part of speech tagging? Word classes Tag sets and problem definition Automatic approaches.
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.
SI485i : NLP Set 7 Syntax and Parsing. 2 Syntax Grammar, or syntax: The kind of implicit knowledge of your native language that you had mastered by the.
POS TAGGING AND HMM Tim Teks Mining Adapted from Heng Ji.
6/18/2016CPSC503 Winter CPSC 503 Computational Linguistics Lecture 6 Giuseppe Carenini.
Speech and Language Processing SLP Chapter 5. 10/31/1 2 Speech and Language Processing - Jurafsky and Martin 2 Today  Parts of speech (POS)  Tagsets.
CSC 594 Topics in AI – Natural Language Processing
Lecture 5 POS Tagging Methods
Lecture 9: Part of Speech
CSCI 5832 Natural Language Processing
CS4705 Part of Speech tagging
LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong.
CSC 594 Topics in AI – Natural Language Processing
KEY CHALLENGES Overview POS Tagging
CPSC 503 Computational Linguistics
Natural Language Processing
PART OF SPEECH TAGGING (POS)
Natural Language Processing
CPSC 503 Computational Linguistics
Natural Language Processing (NLP)
Presentation transcript:

1 POS Tagging: Introduction Heng Ji Feb 2, 2008 Acknowledgement: some slides from Ralph Grishman, Nicolas Nicolov, J&M

2/39 Some Administrative Stuff Assignment 1 due on Feb 17 Textbook: required for assignments and final exam

3/39 Outline Parts of speech (POS) Tagsets POS Tagging Rule-based tagging Markup Format Open source Toolkits

4/39 What is Part-of-Speech (POS) Generally speaking, Word Classes (=POS) : Verb, Noun, Adjective, Adverb, Article, … We can also include inflection: Verbs: Tense, number, … Nouns: Number, proper/common, … Adjectives: comparative, superlative, … …

5/39 Parts of Speech 8 (ish) traditional parts of speech Noun, verb, adjective, preposition, adverb, article, interjection, pronoun, conjunction, etc Called: parts-of-speech, lexical categories, word classes, morphological classes, lexical tags... Lots of debate within linguistics about the number, nature, and universality of these We’ll completely ignore this debate.

6/39 7 Traditional POS Categories Nnounchair, bandwidth, pacing Vverbstudy, debate, munch ADJadjpurple, tall, ridiculous ADVadverbunfortunately, slowly, Pprepositionof, by, to PROpronounI, me, mine DETdeterminerthe, a, that, those

7/39 POS Tagging The process of assigning a part-of-speech or lexical class marker to each word in a collection. WORD tag theDET koalaN put V the DET keysN onP theDET tableN

8/39 Penn TreeBank POS Tag Set Penn Treebank: hand-annotated corpus of Wall Street Journal, 1M words 46 tags Some particularities: to /TO not disambiguated Auxiliaries and verbs not distinguished

9/39 Penn Treebank Tagset

10/39 Why POS tagging is useful? Speech synthesis: How to pronounce “ lead ” ? INsult inSULT OBject obJECT OVERflow overFLOW DIScountdisCOUNT CONtent conTENT Stemming for information retrieval Can search for “aardvarks” get “aardvark” Parsing and speech recognition and etc Possessive pronouns (my, your, her) followed by nouns Personal pronouns (I, you, he) likely to be followed by verbs Need to know if a word is an N or V before you can parse Information extraction Finding names, relations, etc. Machine Translation

11/39 Equivalent Problem in Bioinformatics Durbin et al. Biological Sequence Analysis, Cambridge University Press. Several applications, e.g. proteins From primary structure ATCPLELLLD Infer secondary structure HHHBBBBBC..

12/39 Why is POS Tagging Useful? First step of a vast number of practical tasks Speech synthesis How to pronounce “ lead ” ? INsult inSULT OBject obJECT OVERflow overFLOW DIScountdisCOUNT CONtent conTENT Parsing Need to know if a word is an N or V before you can parse Information extraction Finding names, relations, etc. Machine Translation

13/39 Open and Closed Classes Closed class: a small fixed membership Prepositions: of, in, by, … Auxiliaries: may, can, will had, been, … Pronouns: I, you, she, mine, his, them, … Usually function words (short common words which play a role in grammar) Open class: new ones can be created all the time English has 4: Nouns, Verbs, Adjectives, Adverbs Many languages have these 4, but not all!

14/39 Open Class Words Nouns Proper nouns (Boulder, Granby, Eli Manning) English capitalizes these. Common nouns (the rest). Count nouns and mass nouns Count: have plurals, get counted: goat/goats, one goat, two goats Mass: don’t get counted (snow, salt, communism) (*two snows) Adverbs: tend to modify things Unfortunately, John walked home extremely slowly yesterday Directional/locative adverbs (here,home, downhill) Degree adverbs (extremely, very, somewhat) Manner adverbs (slowly, slinkily, delicately) Verbs In English, have morphological affixes (eat/eats/eaten)

15/39 Closed Class Words Examples : prepositions: on, under, over, … particles: up, down, on, off, … determiners: a, an, the, … pronouns: she, who, I,.. conjunctions: and, but, or, … auxiliary verbs: can, may should, … numerals: one, two, three, third, …

16/39 Prepositions from CELEX

17/39 English Particles

18/39 Conjunctions

19/39 POS Tagging Choosing a Tagset There are so many parts of speech, potential distinctions we can draw To do POS tagging, we need to choose a standard set of tags to work with Could pick very coarse tagsets N, V, Adj, Adv. More commonly used set is finer grained, the “Penn TreeBank tagset”, 45 tags PRP$, WRB, WP$, VBG Even more fine-grained tagsets exist

20/39 Using the Penn Tagset The/DT grand/JJ jury/NN commmented/VBD on/IN a/DT number/NN of/IN other/JJ topics/NNS./. Prepositions and subordinating conjunctions marked IN (“although/IN I/PRP..”) Except the preposition/complementizer “to” is just marked “TO”.

21/39 POS Tagging Words often have more than one POS: back The back door = JJ On my back = NN Win the voters back = RB Promised to back the bill = VB The POS tagging problem is to determine the POS tag for a particular instance of a word. These examples from Dekang Lin

22/39 How Hard is POS Tagging? Measuring Ambiguity

23/39 Current Performance How many tags are correct? About 97% currently But baseline is already 90% Baseline algorithm: Tag every word with its most frequent tag Tag unknown words as nouns How well do people do?

24/39 Quick Test: Agreement? the students went to class plays well with others fruit flies like a banana DT: the, this, that NN: noun VB: verb P: prepostion ADV: adverb

25/39 Quick Test the students went to class DT NN VB P NN plays well with others VB ADV P NN NN NN P DT fruit flies like a banana NN NN VB DT NN NN VB P DT NN NN NN P DT NN NN VB VB DT NN

26/39 How to do it? History Brown Corpus Created (EN-US) 1 Million Words Brown Corpus Tagged HMM Tagging (CLAWS) 93%-95% Greene and Rubin Rule Based - 70% LOB Corpus Created (EN-UK) 1 Million Words DeRose/Church Efficient HMM Sparse Data 95%+ British National Corpus (tagged by CLAWS) POS Tagging separated from other NLP Transformation Based Tagging (Eric Brill) Rule Based – 95%+ Tree-Based Statistics (Helmut Shmid) Rule Based – 96%+ Neural Network 96%+ Trigram Tagger (Kempe) 96%+ Combined Methods 98%+ Penn Treebank Corpus (WSJ, 4.5M) LOB Corpus Tagged

27/39 Two Methods for POS Tagging 1. Rule-based tagging (ENGTWOL) 2. Stochastic 1. Probabilistic sequence models HMM (Hidden Markov Model) tagging MEMMs (Maximum Entropy Markov Models)

28/39 Rule-Based Tagging Start with a dictionary Assign all possible tags to words from the dictionary Write rules by hand to selectively remove tags Leaving the correct tag for each word.

29/39 Rule-based taggers Early POS taggers all hand-coded Most of these (Harris, 1962; Greene and Rubin, 1971) and the best of the recent ones, ENGTWOL (Voutilainen, 1995) based on a two-stage architecture Stage 1: look up word in lexicon to give list of potential POSs Stage 2: Apply rules which certify or disallow tag sequences Rules originally handwritten; more recently Machine Learning methods can be used

30/39 Start With a Dictionary she:PRP promised:VBN,VBD toTO back:VB, JJ, RB, NN the:DT bill: NN, VB Etc… for the ~100,000 words of English with more than 1 tag

31/39 Assign Every Possible Tag NN RB VBNJJ VB PRPVBD TOVB DT NN Shepromised to back the bill

32/39 Write Rules to Eliminate Tags Eliminate VBN if VBD is an option when VBN|VBD follows “ PRP” NN RB JJ VB PRPVBD TO VB DTNN Shepromisedtoback thebill VBN

33/39 Stage 1 of ENGTWOL Tagging First Stage: Run words through FST morphological analyzer to get all parts of speech. Example: Pavlov had shown that salivation … PavlovPAVLOV N NOM SG PROPER hadHAVE V PAST VFIN SVO HAVE PCP2 SVO shownSHOW PCP2 SVOO SVO SV thatADV PRON DEM SG DET CENTRAL DEM SG CS salivationN NOM SG

34/39 Stage 2 of ENGTWOL Tagging Second Stage: Apply NEGATIVE constraints. Example: Adverbial “that” rule Eliminates all readings of “that” except the one in “It isn’t that odd” Given input: “that” If (+1 A/ADV/QUANT) ;if next word is adj/adv/quantifier (+2 SENT-LIM) ;following which is E-O-S (NOT -1 SVOC/A) ; and the previous word is not a ; verb like “consider” which ; allows adjective complements ; in “I consider that odd” Then eliminate non-ADV tags Else eliminate ADV

35/39 Inline Mark-up POS Tagging Input Format Pierre Vinken, 61/CD years/NNS old, will join the board as a nonexecutive director Nov. 29. Output Format Pierre/NNP Vinken/NNP,/, 61/CD years/NNS old/JJ,/, will/MD join/VB the/DT board/NN as/IN a/DT nonexecutive/JJ director/NN Nov./NNP 29/CD./.

36/39 POS Tagging Tools NYU Prof. Ralph Grishman’s HMM POS tagger (in Java) Demo How it works: Learned HMM: data/pos_hmm.txt Source code: src/jet/HMM/HMMTagger.java

37/39 POS Tagging Tools Stanford tagger (Loglinear tagger ) Brill tagger ASED_TAGGER_V.1.14.tar.Z ASED_TAGGER_V.1.14.tar.Z tagger LEXICON test BIGRAMS LEXICALRULEFULE CONTEXTUALRULEFILE YamCha (SVM) YamCha MXPOST (Maximum Entropy) MXPOST ftp://ftp.cis.upenn.edu/pub/adwait/jmx/ More complete list at:

38/39 NLP Toolkits Uniform CL Annotation Platform UIMA (IBM NLP platform): Mallet (UMASS): MinorThird (CMU): NLTK: Natural langauge toolkit, with data sets  Demohttp://nltk.sourceforge.net/ Information Extraction Jet (NYU IE toolkit) Gate: University of Sheffield IE toolkithttp://gate.ac.uk/download/index.html Information Retrieval INDRI: Information Retrieval toolkithttp:// Machine Translation Compara: ISI decoder: MOSES:

39/39 Looking Ahead: Next Class Machine Learning for POS Tagging: Hidden Markov Model