Presentation is loading. Please wait.

Presentation is loading. Please wait.

Word classes and part of speech tagging Chapter 5.

Similar presentations


Presentation on theme: "Word classes and part of speech tagging Chapter 5."— Presentation transcript:

1 Word classes and part of speech tagging Chapter 5

2 Slide 1 Outline Why part of speech tagging? Word classes Tag sets and problem definition Automatic approaches 1: rule-based tagging Automatic approaches 2: stochastic tagging On Part 2: finish stochastic tagging, and continue on to: evaluation

3 Slide 2 Definition “The process of assigning a part-of-speech or other lexical class marker to each word in a corpus” (Jurafsky and Martin) the girl kissed the boy on the cheek WORDS TAGS N V P DET

4 Slide 3 An Example the girl kiss the boy on the cheek LEMMATAG +DET +NOUN +VPAST +DET +NOUN +PREP +DET +NOUN the girl kissed the boy on the cheek WORD

5 Slide 4 Motivation Speech synthesis — pronunciation Speech recognition — class-based N-grams Information retrieval — stemming, selection high-content words Word-sense disambiguation Corpus analysis of language & lexicography

6 Slide 5 Word Classes Basic word classes: Noun, Verb, Adjective, Adverb, Preposition, … Open vs. Closed classes Open: Nouns, Verbs, Adjectives, Adverbs. Why “open”? Closed: determiners: a, an, the pronouns: she, he, I prepositions: on, under, over, near, by, …

7 Slide 6 Open Class Words Every known human language has nouns and verbs Nouns: people, places, things Classes of nouns proper vs. common count vs. mass Verbs: actions and processes Adjectives: properties, qualities Adverbs: hodgepodge! Unfortunately, John walked home extremely slowly yesterday Numerals: one, two, three, third, …

8 Slide 7 Closed Class Words Differ more from language to language than open 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, …

9 Slide 8 Word Classes: Tag Sets Vary in number of tags: a dozen to over 200 Size of tag sets depends on language, objectives and purpose –Some tagging approaches (e.g., constraint grammar based) make fewer distinctions e.g., conflating prepositions, conjunctions, particles –Simple morphology = more ambiguity = fewer tags

10 Slide 9 Word Classes: Tag set example PRP PRP$

11 Slide 10 Example of Penn Treebank Tagging of Brown Corpus Sentence The/DT grand/JJ jury/NN commented/VBD on/IN a/DT number/NN of/IN other/JJ topics/NNS./. VB DT NN. Book that flight. VBZ DT NN VB NN ? Does that flight serve dinner ? See http://www.infogistics.com/posdemo.htmhttp://www.infogistics.com/posdemo.htm Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo

12 Slide 11 The Problem Words often have more than one word class: this This is a nice day = PRP This day is nice = DT You can go this far = RB

13 Slide 12 Word Class Ambiguity (in the Brown Corpus) Unambiguous (1 tag): 35,340 Ambiguous (2-7 tags): 4,100 2 tags3,760 3 tags264 4 tags61 5 tags12 6 tags2 7 tags1 (Derose, 1988)

14 Slide 13 Part-of-Speech Tagging Rule-Based Tagger: ENGTWOL (ENGlish TWO Level analysis) Stochastic Tagger: HMM-based Transformation-Based Tagger (Brill) (we won’t cover this)

15 Slide 14 Rule-Based Tagging Basic Idea: –Assign all possible tags to words –Remove tags according to set of rules of type: if word+1 is an adj, adv, or quantifier and the following is a sentence boundary and word-1 is not a verb like “consider” then eliminate non-adv else eliminate adv. –Typically more than 1000 hand-written rules

16 Slide 15 Sample ENGTWOL Lexicon Demo: http://www2.lingsoft.fi/cgi-bin/engtwolhttp://www2.lingsoft.fi/cgi-bin/engtwol

17 Slide 16 Stage 1 of ENGTWOL Tagging First Stage: Run words through a 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

18 Slide 17 Stage 2 of ENGTWOL Tagging Second Stage: Apply constraints. Constraints used in negative way. Example: Adverbial “that” rule Given input: “that” If (+1 A/ADV/QUANT) (+2 SENT-LIM) (NOT -1 SVOC/A) Then eliminate non-ADV tags Else eliminate ADV


Download ppt "Word classes and part of speech tagging Chapter 5."

Similar presentations


Ads by Google