1 SIMS 290-2: Applied Natural Language Processing Marti Hearst Sept 22, 2004.

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

CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 2 (06/01/06) Prof. Pushpak Bhattacharyya IIT Bombay Part of Speech (PoS)
Sequence Classification: Chunking Shallow Processing Techniques for NLP Ling570 November 28, 2011.
LING 388: Language and Computers Sandiway Fong Lecture 2.
March 1, 2009 Dr. Muhammed Al-Mulhem 1 ICS 482 Natural Language Processing Probabilistic Context Free Grammars (Chapter 14) Muhammed Al-Mulhem March 1,
Shallow Parsing CS 4705 Julia Hirschberg 1. Shallow or Partial Parsing Sometimes we don’t need a complete parse tree –Information extraction –Question.
Re-ranking for NP-Chunking: Maximum-Entropy Framework By: Mona Vajihollahi.
PCFG Parsing, Evaluation, & Improvements Ling 571 Deep Processing Techniques for NLP January 24, 2011.
Search and Retrieval: More on Term Weighting and Document Ranking Prof. Marti Hearst SIMS 202, Lecture 22.
Project topics Projects are due till the end of May Choose one of these topics or think of something else you’d like to code and send me the details (so.
CS 4705 Lecture 19 Word Sense Disambiguation. Overview Selectional restriction based approaches Robust techniques –Machine Learning Supervised Unsupervised.
Stemming, tagging and chunking Text analysis short of parsing.
1 SIMS 290-2: Applied Natural Language Processing Marti Hearst Sept 20, 2004.
Ch 10 Part-of-Speech Tagging Edited from: L. Venkata Subramaniam February 28, 2002.
CS 330 Programming Languages 09 / 13 / 2007 Instructor: Michael Eckmann.
1 CSC 594 Topics in AI – Applied Natural Language Processing Fall 2009/ Shallow Parsing.
1 I256: Applied Natural Language Processing Marti Hearst Sept 27, 2006.
Language, Mind, and Brain by Ewa Dabrowska Chapter 2: Language processing: speed and flexibility.
1 I256: Applied Natural Language Processing Marti Hearst Sept 25, 2006.
Part of speech (POS) tagging
Machine Learning in Natural Language Processing Noriko Tomuro November 16, 2006.
1 Natural Language Processing for the Web Prof. Kathleen McKeown 722 CEPSR, Office Hours: Wed, 1-2; Tues 4-5 TA: Yves Petinot 719 CEPSR,
(Some issues in) Text Ranking. Recall General Framework Crawl – Use XML structure – Follow links to get new pages Retrieve relevant documents – Today.
Albert Gatt Corpora and Statistical Methods Lecture 9.
March 2006 CLINT-CS 1 Introduction to Computational Linguistics Chunk Parsing.
ELN – Natural Language Processing Giuseppe Attardi
Robert Hass CIS 630 April 14, 2010 NP NP↓ Super NP tagging JJ ↓
1 Statistical NLP: Lecture 10 Lexical Acquisition.
BİL711 Natural Language Processing1 Statistical Parse Disambiguation Problem: –How do we disambiguate among a set of parses of a given sentence? –We want.
Probabilistic Parsing Reading: Chap 14, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Paul Tarau, based on Rada.
For Friday Finish chapter 23 Homework: –Chapter 22, exercise 9.
A Survey of NLP Toolkits Jing Jiang Mar 8, /08/20072 Outline WordNet Statistics-based phrases POS taggers Parsers Chunkers (syntax-based phrases)
Distributional Part-of-Speech Tagging Hinrich Schütze CSLI, Ventura Hall Stanford, CA , USA NLP Applications.
1 Statistical Parsing Chapter 14 October 2012 Lecture #9.
October 2005CSA3180: Text Processing II1 CSA3180: Natural Language Processing Text Processing 2 Shallow Parsing and Chunking Python and NLTK NLTK Exercises.
Ling 570 Day 17: Named Entity Recognition Chunking.
1 Statistical NLP: Lecture 9 Word Sense Disambiguation.
CSA2050: Introduction to Computational Linguistics Part of Speech (POS) Tagging II Transformation Based Tagging Brill (1995)
Unsupervised learning of Natural languages Eitan Volsky Yasmine Meroz.
CS 4705 Lecture 19 Word Sense Disambiguation. Overview Selectional restriction based approaches Robust techniques –Machine Learning Supervised Unsupervised.
CS774. Markov Random Field : Theory and Application Lecture 19 Kyomin Jung KAIST Nov
A Cascaded Finite-State Parser for German Michael Schiehlen Institut für Maschinelle Sprachverarbeitung Universität Stuttgart
CPSC 422, Lecture 15Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 15 Oct, 14, 2015.
CS : Speech, NLP and the Web/Topics in AI Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture-14: Probabilistic parsing; sequence labeling, PCFG.
Using a Named Entity Tagger to Generalise Surface Matching Text Patterns for Question Answering Mark A. Greenwood and Robert Gaizauskas Natural Language.
Number Sense Disambiguation Stuart Moore Supervised by: Anna Korhonen (Computer Lab)‏ Sabine Buchholz (Toshiba CRL)‏
For Friday Finish chapter 23 Homework –Chapter 23, exercise 15.
Supertagging CMSC Natural Language Processing January 31, 2006.
February 2007CSA3050: Tagging III and Chunking 1 CSA2050: Natural Language Processing Tagging 3 and Chunking Transformation Based Tagging Chunking.
4. Relationship Extraction Part 4 of Information Extraction Sunita Sarawagi 9/7/2012CS 652, Peter Lindes1.
Shallow Parsing for South Asian Languages -Himanshu Agrawal.
October 2005CSA3180: Text Processing II1 CSA3180: Natural Language Processing Text Processing 2 Python and NLTK Shallow Parsing and Chunking NLTK Lite.
11 Project, Part 3. Outline Basics of supervised learning using Naïve Bayes (using a simpler example) Features for the project 2.
SIMS 296a-4 Text Data Mining Marti Hearst UC Berkeley SIMS.
Chunk Parsing. Also called chunking, light parsing, or partial parsing. Method: Assign some additional structure to input over tagging Used when full.
Word classes and part of speech tagging. Slide 1 Outline Why part of speech tagging? Word classes Tag sets and problem definition Automatic approaches.
CSA2050: Introduction to Computational Linguistics Part of Speech (POS) Tagging II Transformation Based Tagging Brill (1995)
For Monday Read chapter 26 Homework: –Chapter 23, exercises 8 and 9.
Overview of Statistical NLP IR Group Meeting March 7, 2006.
NATURAL LANGUAGE PROCESSING
LING/C SC 581: Advanced Computational Linguistics Lecture Notes Feb 3 rd.
Introduction to Information Retrieval Introduction to Information Retrieval Lecture 15: Text Classification & Naive Bayes 1.
LING/C SC 581: Advanced Computational Linguistics Lecture Notes Feb 17 th.
Dan Roth University of Illinois, Urbana-Champaign 7 Sequential Models Tutorial on Machine Learning in Natural.
LING 581: Advanced Computational Linguistics Lecture Notes March 2nd.
Natural Language Processing Vasile Rus
CSC 594 Topics in AI – Natural Language Processing
CSCI 5832 Natural Language Processing
Probabilistic and Lexicalized Parsing
Statistical NLP: Lecture 10
Presentation transcript:

1 SIMS 290-2: Applied Natural Language Processing Marti Hearst Sept 22, 2004

2 Today Cascaded Chunking Example of Using Chunking: Word Associations Evaluating Chunking Going to the next level: Parsing

3 Cascaded Chunking Goal: create chunks that include other chunks Examples: PP consists of preposition + NP VP consists of verb followed by PPs or NPs How to make it work in NLTK The tutorial is a bit confusing, I attempt to clarify

4 Creating Cascaded Chunkers Start with a sentence token A list of words with parts of speech assigned Create a fresh one or use one from a corpus

5 Creating Cascaded Chunkers Create a set of chunk parsers One for each chunk type Each one takes as input some kind of list of tokens, and produced as output a NEW list of tokens –You can decide what this new list is called  Examples: NP-CHUNK, PP-CHUNK, VP-CHUNK –You can also decide what to name each occurrence of the chunk type, as it is assigned to a subset of tokens  Examples: NP, VP, PP How to match higher-level tags? It just seems to match their string description So best be certain that their name does not overlap with POS tags too

6

7

8

9 Let’s do some text analysis Let’s try this on more complex sentences First, read in part of a corpus Then, count how often each word occurs with each POS Determine some common verbs, choose one Make a list of sentences containing that verb Test out the chunker on them; examine further

10

11

12

13 Why didn’t this parse work?

14 Why didn’t this parse work?

15 Why didn’t this parse work?

16 Why didn’t this parse work?

17 Corpus Analysis for Discovery of Word Associations Classic paper by Church & Hanks showed how to use a corpus and a shallow parser to find interesting dependencies between words –Word Association Norms, Mutual Information, and Lexicography, Computational Linguistics, 16(1), 1991 – Some cognitive evidence: Word association norms: which word to people say most often after hearing another word –Given doctor: nurse, sick, health, medicine, hospital… People respond more quickly to a word if they’ve seen an associated word –E.g., if you show “bread” they’re faster at recognizing “butter” than “nurse” (vs a nonsense string)

18 Corpus Analysis for Discovery of Word Associations Idea: use a corpus to estimate word associations Association ratio: log ( P(x,y) / P(x)P(y) ) The probability of seeing x followed by y vs. the probably of seeing x anywhere times the probability of seeing y anywhere P(x) is how often x appears in the corpus P(x,y) is how often y follows x within w words Interesting associations with “doctor”: –X: honorary Y: doctor –X: doctors Y: dentists –X: doctors Y: nurses –X: doctors Y: treating –X: examined Y:doctor –X: doctors Y: treat

19 Corpus Analysis for Discovery of Word Associations Now let’s make use of syntactic information. Look at which words and syntactic forms follow a given verb, to see what kinds of arguments it takes Compute triples of subject-verb-object Example: nouns that appear as the object of the verb usage of “drink”: –martinis, cup_water, champagne, beverage, cup_coffee, cognac, beer, cup, coffee, toast, alcohol… –What can we note about many of these words? Example: verbs that have “telephone” in their object: –sit_by, disconnect, answer, hang_up, tap, pick_up, return, be_by, spot, repeat, place, receive, install, be_on

20 Corpus Analysis for Discovery of Word Associations The approach has become standard Entire collections available Dekang Lin’s Dependency Database –Given a word, retrieve words that had dependency relationship with the input word Dependency-based Word Similarity –Given a word, retrieve the words that are most similar to it, based on dependencies

21 Example Dependency Database: “sell”

22 Example Dependency-based Similarity: “sell”

23 Homework Assignment Choose a verb of interest Analyze the context in which the verb appears Can use any corpus you like –Can train a tagger and run it on some fresh text Example: What kinds of arguments does it take? Improve on my chunking rules to get better characterizations

24 Evaluating the Chunker Why not just use accuracy? Accuracy = #correct/total number Definitions Total: number of chunks in gold standard Guessed: set of chunks that were labeled Correct: of the guessed, which were correct Missed: how many correct chunks not guessed? Precision: #correct / #guessed Recall: #correct / #total F-measure: 2 * (Prec*Recall) / (Prec + Recall)

25 Example Assume the following numbers Total: 100 Guessed: 120 Correct: 80 Missed: 20 Precision: 80 / 120 = 0.67 Recall: 80 / 100 = 0.80 F-measure: 2 * (.67*.80) / ( ) = 0.69

26 Evaluating in NLTK We have some already chunked text from the Treebank The code below uses the existing parse to compare against, and to generate Tokens of type word/tag to parse with our own chunker. Have to add location information so the evaluation code can compare which words have been assigned which labels

27 How to get better accuracy? Use a full syntactic parser These days the probabilistic ones work surprisingly well They are getting faster too. Prof. Dan Klein’s is very good and easy to run –

28

29

30

31

32 Next Week Shallow Parsing Assignment Due on Wed Sept 29 Next week: Read paper on end-of-sentence disambiguation Presley and Barbara lecturing on categorization We will read the categorization tutorial the following week