Lecture 21 Computational Lexical Semantics

Slides:



Advertisements
Similar presentations
School of something FACULTY OF OTHER School of Computing FACULTY OF ENGINEERING Word Sense Disambiguation semantic tagging of text, for Confusion Set Disambiguation.
Advertisements

Intro to NLP - J. Eisner1 Splitting Words a.k.a. “Word Sense Disambiguation”
Multi-Document Person Name Resolution Michael Ben Fleischman (MIT), Eduard Hovy (USC) From Proceedings of ACL-42 Reference Resolution workshop 2004.
Word Sense Disambiguation MAS.S60 Catherine Havasi Rob Speer.
Word sense disambiguation and information retrieval Chapter 17 Jurafsky, D. & Martin J. H. SPEECH and LANGUAGE PROCESSING Jarmo Ritola -
Word Sense Disambiguation Ling571 Deep Processing Techniques for NLP February 23, 2011.
The use of unlabeled data to improve supervised learning for text summarization MR Amini, P Gallinari (SIGIR 2002) Slides prepared by Jon Elsas for the.
CS Word Sense Disambiguation. 2 Overview A problem for semantic attachment approaches: what happens when a given lexeme has multiple ‘meanings’?
CS347 Review Slides (IR Part II) June 6, 2001 ©Prabhakar Raghavan.
CS 4705 Lecture 19 Word Sense Disambiguation. Overview Selectional restriction based approaches Robust techniques –Machine Learning Supervised Unsupervised.
Introduction to CL Session 1: 7/08/2011. What is computational linguistics? Processing natural language text by computers  for practical applications.
Taking the Kitchen Sink Seriously: An Ensemble Approach to Word Sense Disambiguation from Christopher Manning et al.
Vector Space Model CS 652 Information Extraction and Integration.
CS 4705 Word Sense Disambiguation. Overview Selectional restriction based approaches Robust techniques –Machine Learning Supervised Unsupervised –Dictionary-based.
LSA 311 Computational Lexical Semantics Dan Jurafsky Stanford University Lecture 2: Word Sense Disambiguation.
Semi-Supervised Natural Language Learning Reading Group I set up a site at: ervised/
Albert Gatt Corpora and Statistical Methods Lecture 9.
Lecture 1, 7/21/2005Natural Language Processing1 CS60057 Speech &Natural Language Processing Autumn 2005 Lecture 1 21 July 2005.
Word Sense Disambiguation. Word Sense Disambiguation (WSD) Given A word in context A fixed inventory of potential word senses Decide which sense of the.
ELN – Natural Language Processing Giuseppe Attardi
Lexical Semantics CSCI-GA.2590 – Lecture 7A
Part II. Statistical NLP Advanced Artificial Intelligence Applications of HMMs and PCFGs in NLP Wolfram Burgard, Luc De Raedt, Bernhard Nebel, Lars Schmidt-Thieme.
COMP423: Intelligent Agent Text Representation. Menu – Bag of words – Phrase – Semantics – Bag of concepts – Semantic distance between two words.
Personalisation Seminar on Unlocking the Secrets of the Past: Text Mining for Historical Documents Sven Steudter.
Word Sense Disambiguation Many words have multiple meanings –E.g, river bank, financial bank Problem: Assign proper sense to each ambiguous word in text.
Text Classification, Active/Interactive learning.
1 Statistical Parsing Chapter 14 October 2012 Lecture #9.
1 Statistical NLP: Lecture 9 Word Sense Disambiguation.
Lecture 20a Feature Based Grammars Topics Description Logic III Overview of MeaningReadings: Text Chapter 18 NLTK book Chapter 10 March 28, 2013 CSCE 771.
Word Sense Disambiguation Reading: Chap 16-17, Jurafsky & Martin Instructor: Rada Mihalcea.
W ORD S ENSE D ISAMBIGUATION By Mahmood Soltani Tehran University 2009/12/24 1.
Lecture 22 Word Similarity Topics word similarity Thesaurus based word similarity Intro. Distributional based word similarityReadings: NLTK book Chapter.
An Effective Word Sense Disambiguation Model Using Automatic Sense Tagging Based on Dictionary Information Yong-Gu Lee
CS 4705 Lecture 19 Word Sense Disambiguation. Overview Selectional restriction based approaches Robust techniques –Machine Learning Supervised Unsupervised.
October 2005CSA3180 NLP1 CSA3180 Natural Language Processing Introduction and Course Overview.
Lecture 21 Computational Lexical Semantics Topics Features in NLTK III Computational Lexical Semantics Semantic Web USCReadings: NLTK book Chapter 10 Text.
Lecture 22 Word Similarity Topics word similarity Thesaurus based word similarity Intro. Distributional based word similarityReadings: NLTK book Chapter.
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 24 (14/04/06) Prof. Pushpak Bhattacharyya IIT Bombay Word Sense Disambiguation.
©2012 Paula Matuszek CSC 9010: Text Mining Applications Lab 3 Dr. Paula Matuszek (610)
KNN & Naïve Bayes Hongning Wang Today’s lecture Instance-based classifiers – k nearest neighbors – Non-parametric learning algorithm Model-based.
Lecture 24 Distributiona l based Similarity II Topics Distributional based word similarityReadings: NLTK book Chapter 2 (wordnet) Text Chapter 20 April.
Overview of Statistical NLP IR Group Meeting March 7, 2006.
Second Language Learning From News Websites Word Sense Disambiguation using Word Embeddings.
KNN & Naïve Bayes Hongning Wang
Problem Solving with NLTK MSE 2400 EaLiCaRA Dr. Tom Way.
Text Classification and Naïve Bayes Formalizing the Naïve Bayes Classifier.
Intro to NLP - J. Eisner1 Splitting Words a.k.a. “Word Sense Disambiguation”
CSCE 771 Natural Language Processing
SENSEVAL: Evaluating WSD Systems
Relation Extraction CSCI-GA.2591
Natural Language Processing (NLP)
Lecture 15: Text Classification & Naive Bayes
Lecture 22 Word Similarity
Category-Based Pseudowords
Statistical NLP: Lecture 9
Lecture 9 The GHMM Library and The Brill Tagger
WordNet WordNet, WSD.
Computational Lexical Semantics
Introduction Task: extracting relational facts from text
A method for WSD on Unrestricted Text
Lecture 7 HMMs – the 3 Problems Forward Algorithm
Lecture 7 HMMs – the 3 Problems Forward Algorithm
CS4705 Natural Language Processing
Lecture 20a Feature Based Grammars
Lecture 22 Word Similarity
Lecture 19 Word Meanings II
Natural Language Processing (NLP)
Unsupervised Word Sense Disambiguation Using Lesk algorithm
Statistical NLP : Lecture 9 Word Sense Disambiguation
Natural Language Processing (NLP)
Presentation transcript:

Lecture 21 Computational Lexical Semantics CSCE 771 Natural Language Processing Lecture 21 Computational Lexical Semantics Topics Features in NLTK III Computational Lexical Semantics Semantic Web USC Readings: NLTK book Chapter 10 Text Chapters 20 April 3, 2013

Overview Readings: Text 19,20 NLTK Book: Chapter 10 Last Time (Programming) Features in NLTK NL queries  SQL NLTK support for Interpretations and Models Propositional and predicate logic support Prover9 Today Last Lectures slides 25-29 Computational Lexical Semantics Readings: Text 19,20 NLTK Book: Chapter 10 Next Time: Computational Lexical Semantics II

Model Building in NLTK - Chapter 10continued Mace model builder lp = nltk.LogicParser() # install Mace4 config_mace4('c:\Python26\Lib\site-packages\prover9') a3 = lp.parse('exists x.(man(x) & walks(x))') c1 = lp.parse('mortal(socrates)') c2 = lp.parse('-mortal(socrates)') mb = nltk.Mace(5) print mb.build_model(None, [a3, c1]) True print mb.build_model(None, [a3, c2]) print mb.build_model(None, [c1, c2]) False

>>> a4 = lp. parse('exists y. (woman(y) & all x >>> a4 = lp.parse('exists y. (woman(y) & all x. (man(x) -> love(x,y)))') >>> a5 = lp.parse('man(adam)') >>> a6 = lp.parse('woman(eve)') >>> g = lp.parse('love(adam,eve)') >>> mc = nltk.MaceCommand(g, assumptions=[a4, a5, a6]) >>> mc.build_model() True

10.4 The Semantics of English Sentences Principle of compositionality --

Representing the λ-Calculus in NLTK (33) a. (walk(x) ∧ chew_gum(x)) b. λx.(walk(x) ∧ chew_gum(x)) c. \x.(walk(x) & chew_gum(x)) -- the NLTK way!

Lambda0.py import nltk from nltk import load_parser lp = nltk.LogicParser() e = lp.parse(r'\x.(walk(x) & chew_gum(x))') print e \x.(walk(x) & chew_gum(x)) e.free() print lp.parse(r'\x.(walk(x) & chew_gum(y))') \x.(walk(x) & chew_gum(y))

Simple β-reductions >>> e = lp.parse(r'\x.(walk(x) & chew_gum(x))(gerald)') >>> print e \x.(walk(x) & chew_gum(x))(gerald) >>> print e.simplify() [1] (walk(gerald) & chew_gum(gerald))

Predicate reductions >>> e3 = lp.parse('\P.exists x.P(x)(\y.see(y, x))') >>> print e3 (\P.exists x.P(x))(\y.see(y,x)) >>> print e3.simplify() exists z1.see(z1,x)

Figure 19.7 Inheritance of Properties Exists e,x,y Eating(e) ^ Agent(e, x) ^ Theme(e, y) “hamburger edible?” from wordnet Speech and Language Processing, Second Edition Daniel Jurafsky and James H. Martin Copyright ©2009 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Figure 20.1 Possible sense tags for bass Chapter 20 – Word Sense disambiguation (WSD) Machine translation Supervised vs unsupervised learning Semantic concordance – corpus with words tagged with sense tags

Feature Extraction for WSD Feature vectors Collocation [wi-2, POSi-2, wi-1, POSi-1, wi, POSi, wi+1, POSi+1, wi+2, POSi+2] Bag-of-words – unordered set of neighboring words Represent sets of most frequent content words with membership vector [0,0,1,0,0,0,1] – set of 3rd and 7th most freq. content word Window of nearby words/features

Naïve Bayes Classifier w – word vector s – sense tag vector f – feature vector [wi, POSi ] for i=1, …n Approximate by frequency counts But how practical?

Looking for Practical formula . Still not practical

Naïve == Assume Independence Now practical, but realistic?

Training = count frequencies . Maximum likelihood estimator (20.8)

Decision List Classifiers Naïve Bayes hard for humans to examine decisions and understand Decision list classifiers - like “case” statement sequence of (test, returned-sense-tag) pairs

Figure 20.2 Decision List Classifier Rules

WSD Evaluation, baselines, ceilings Extrinsic evaluation - evaluating embedded NLP in end-to-end applications (in vivo) Intrinsic evaluation – WSD evaluating by itself (in vitro) Sense accuracy Corpora – SemCor, SENSEVAL, SEMEVAL Baseline - Most frequent sense (wordnet sense 1) Ceiling – Gold standard – human experts with discussion and agreement

Figure 20.3 Simplified Lesk Algorithm gloss/sentence overlap

Simplified Lesk example The bank can guarantee deposits will eventually cover future tuition costs because it invests in adjustable rate mortgage securities.

SENSEVAL competitions http://www.senseval.org/ Check the Senseval-3 website.

Corpus Lesk weights applied to overlap words inverse document frequency idfi = log (Ndocs / num docs containing wi)

20.4.2 Selectional Restrictions and Preferences  

Wordnet Semantic classes of Objects

Minimally Supervised WSD: Bootstrapping Yarowsky algorithm Heuritics: one sense per collocations one sense per discourse

Figure 20.4 Two senses of plant

Figure 20.5

Figure 20.6 Path Based Similarity

Figure 20.6 Path Based Similarity . \ simpath(c1, c2)= 1/pathlen(c1, c2) (length + 1)

Information Content word similarity  

Figure 20.7 Wordnet with P(c) values

Figure 20.8

Figure 20.9

Figure 20.10

Figure 20.11

Figure 20.12

Figure 20.13

Figure 20.14

Figure 20.15

Figure 20.16