Part of Speech tagging Lecture 9Garden path sentencesWhat is a word class?Parts of SpeechPOS examplesPOS Tagging: DefinitionPOS Tagging exampleWhat is POS tagging good for?Open and closed class wordsOpen class wordsSlide 11How do we decide which words go in which classes?Closed Class WordsSlide 14Prepositions from CELEXEnglish particlesConjunctionsPOS tagging: Choosing a tagsetPenn TreeBank POS Tag setUsing the UPenn tagsetPOS TaggingHow do we assign POS tags to words in a sentence?How hard is POS tagging? Measuring ambiguityPotential Sources of DisambiguationRule-based taggingStart with a dictionaryUse the dictionary to assign every possible tagWrite rules to eliminate tagsSample ENGTWOL LexiconStage 1 of ENGTWOL TaggingStage 2 of ENGTWOL TaggingStatistical TaggingConditional Probability and TagsMost frequent tagCounting in a corpusThe Most Frequent Tag algorithmThe Most Frequent Tag algorithm: the dictionaryUsing a corpus to build a dictionaryEvaluating performanceTest setTraining and test setsComputing % correctTraining and Test setsEvaluation and rule-based taggersSummary1Part of Speech taggingLecture 9Slides adapted from: Dan Jurafsky, Julia Hirschberg, Jim Martin2Garden path sentencesThe old dog the footsteps of the young.The cotton clothing is made of grows in Mississippi.The horse raced past the barn fell.3What is a word class?Words that somehow ‘behave’ alike:–Appear in similar contexts–Perform similar functions in sentences–Undergo similar transformations4Parts of Speech8 (ish) traditional parts of speech–Noun, verb, adjective, preposition, adverb, article, interjection, pronoun, conjunction, etc–This idea has been around for over 2000 years (Dionysius Thrax of Alexandria, c. 100 B.C.)–Called: parts-of-speech, lexical category, word classes, morphological classes, lexical tags, POS5POS examplesN noun chair, bandwidth, pacingV verb study, debate, munchADJ adjective purple, tall, ridiculousADV adverb unfortunately, slowly,P preposition of, by, toPRO pronoun I, me, mineDET determiner the, a, that, those6POS Tagging: DefinitionThe process of assigning a part-of-speech or lexical class marker to each word in a corpus:thekoalaputthekeysonthetableWOR DSTAGSNVPDET7POS Tagging exampleWORD tagthe DETkoala Nput Vthe DETkeys Non Pthe DETtable N8What is POS tagging good for?Speech synthesis:–How to pronounce “lead”?–INsult inSULT–OBject obJECT–OVERflow overFLOW–DIScount disCOUNT–CONtent conTENTParsing–Need to know if a word is an N or V before you can parseWord prediction in speech recognition –Possessive pronouns (my, your, her) followed by nouns–Personal pronouns (I, you, he) likely to be followed by verbs………9Open and closed class wordsClosed class: a relatively 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 all 4, but not all!–In Lakhota and possibly Chinese, what English treats as adjectives act more like verbs.10Open class wordsNouns–Proper nouns (Columbia University, New York City, Sharon Gorman, Metropolitan Transit Center). English capitalizes these.–Common nouns (the rest). German capitalizes these.–Count nouns and mass nounsCount: have plurals, get counted: goat/goats, one goat, two goatsMass: don’t get counted (fish, salt, communism) (*two fishes)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)–Actions (walk, ate) and states (be, exude)11Many subclasses, e.g.–eats/V eat/VB, eat/VBP, eats/VBZ, ate/VBD, eaten/VBN, eating/VBG, ... –Reflect morphological form & syntactic function12How do we decide which words go in which classes?Nouns denote people, places and things and can be preceded by articles? But…My typing is very bad.*The Mary loves John.Verbs are used to refer to actions, processes, states–But some are closed class and some are openI will have emailed everyone by noon.•Adverbs modify actions–Is Monday a temporal adverb or a noun?13Closed Class WordsClosed class words (Prep, Det, Pron, Conj, Aux, Part, Num) are easier, since we can enumerate them….but–Part vs. PrepGeorge eats up his dinner/George eats his dinner up.George eats up the street/*George eats the street up.–Articles come in 2 flavors: definite (the) and indefinite (a, an)14–Conjunctions also have 2 varieties, coordinate (and, but) and subordinate/complementizers (that, because, unless,…)–Pronouns may be personal (I, he,...), possessive (my, his), or wh (who, whom,...)–Auxiliary verbs include the copula (be), do, have and their variants plus the modals (can, will, shall,…)15Prepositions from CELEX16English particles17Conjunctions18POS tagging: Choosing a tagsetThere are so many parts of speech, potential distinctions we can drawTo do POS tagging, need to choose a standard set of tags to work withCould pick very coarse tagets–N, V, Adj, Adv.Brown Corpus (Francis & Kucera ‘82), 1M words, 87 tagsPenn Treebank: hand-annotated corpus of Wall Street Journal, 1M words, 45-46 tags–Commonly used –set is finer grained,Even more fine-grained tagsets exist19Penn TreeBank POS Tag set20Using the UPenn tagsetThe/DT grand/JJ jury/NN commented/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”.21POS TaggingWords 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 = VBThe POS tagging problem is to determine the POS tag for a particular instance of a word.These examples from Dekang Lin22How do we assign POS tags to words in a sentence?–Time flies like an arrow.–Time/[V,N] flies/[V,N] like/[V,Prep] an/Det arrow/N–Time/N flies/V like/Prep an/Det arrow/N–Fruit/N flies/N like/V a/DET banana/N–Fruit/N flies/V like/Prep a/DET
View Full Document