LING/C SC 581: Advanced Computational Linguistics

Slides:



Advertisements
Similar presentations
Ontologies ARIN Practical W7/Spr Dimitar Kazakov & Suresh Manandhar.
Advertisements

Using Link Grammar and WordNet on Fact Extraction for the Travel Domain.
LING 581: Advanced Computational Linguistics Lecture Notes April 19th.
Objected Oriented Perl An introduction – because I don’t have the time or patience for an in- depth OOP lecture series…
1 Extended Gloss Overlaps as a Measure of Semantic Relatedness Satanjeev Banerjee Ted Pedersen Carnegie Mellon University University of Minnesota Duluth.
CS 206 Introduction to Computer Science II 11 / 07 / 2008 Instructor: Michael Eckmann.
Lexical Semantics and Word Senses Hongning Wang
Creating a Similarity Graph from WordNet
LING 581: Advanced Computational Linguistics Lecture Notes April 6th.
Slide 1 EE3J2 Data Mining EE3J2 Data Mining Lecture 7 Topic Spotting & Query Expansion Martin Russell.
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
C SC 620 Advanced Topics in Natural Language Processing Lecture Notes 2 1/20/04.
Graphs & Graph Algorithms Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
Course G Web Search Engines 3/9/2011 Wei Xu
LING 581: Advanced Computational Linguistics Lecture Notes April 12th.
Antonym Creation Tool Presented By Thapar University WordNet Development Team.
Information Retrieval and Web Search Relevance Feedback. Query Expansion Instructor: Rada Mihalcea Class web page:
Wordnet, Raw Text Pinker, continuing Chapter 2
COMP423.  Query expansion  Two approaches ◦ Relevance feedback ◦ Thesaurus-based  Most Slides copied from ◦
LING 438/538 Computational Linguistics Sandiway Fong Lecture 29.
Oana Adriana Şoica Building and Ordering a SenDiS Lexicon Network.
1 Query Operations Relevance Feedback & Query Expansion.
WORD SENSE DISAMBIGUATION STUDY ON WORD NET ONTOLOGY Akilan Velmurugan Computer Networks – CS 790G.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 02 : Search.
Modelling Human Thematic Fit Judgments IGK Colloquium 3/2/2005 Ulrike Padó.
Wordnet - A lexical database for the English Language.
WordNet Enhancements: Toward Version 2.0 WordNet Connectivity Derivational Connections Disambiguated Definitions Topical Connections.
Information Retrieval and Web Search Relevance Feedback. Query Expansion Instructor: Rada Mihalcea.
LING 581: Advanced Computational Linguistics Lecture Notes February 26th.
An Applied Ontological Approach to Computational Semantics Sam Zhang.
Lecture 19 Word Meanings II Topics Description Logic III Overview of MeaningReadings: Text Chapter 189NLTK book Chapter 10 March 27, 2013 CSCE 771 Natural.
WordNet::Similarity Measuring the Relatedness of Concepts Yue Wang Department of Computer Science.
Lexical Semantics and Word Senses Hongning Wang
Query expansion COMP423. Menu Query expansion Two approaches Relevance feedback Thesaurus-based Most Slides copied from
LING 581: Advanced Computational Linguistics Lecture Notes March 9th.
LING 581: Advanced Computational Linguistics
How to Find the Answer.
Sampath Jayarathna Cal Poly Pomona
LING/C SC/PSYC 438/538 Lecture 5 Sandiway Fong.
Graphs Chapter 15 introduces graphs which are probably the most general and commonly-used data structure. This lecture introduces heaps, which are used.
LING 581: Advanced Computational Linguistics
Programming Abstractions
LING/C SC/PSYC 438/538 Lecture 7 Sandiway Fong.
The Bag and Sequence Classes with Linked Lists
Lecture 19 Word Meanings II
LING 581: Advanced Computational Linguistics
LING 581: Advanced Computational Linguistics
Programming Abstractions
LING 581: Advanced Computational Linguistics
LING/C SC/PSYC 438/538 Lecture 4 Sandiway Fong.
LING 581: Advanced Computational Linguistics
Algorithm design and Analysis
LING 581: Advanced Computational Linguistics
Heuristics Definition – a heuristic is an inexact algorithm that is based on intuitive and plausible arguments which are “likely” to lead to reasonable.
CSE 421: Introduction to Algorithms
LING/C SC/PSYC 438/538 Lecture 9 Sandiway Fong.
Algorithm Efficiency, Big O Notation, and Javadoc
Bulgarian WordNet Svetla Koeva Institute for Bulgarian Language
Various News From Detector Description
WordNet WordNet, WSD.
Chapters 15 and 16b: Query Optimization
Relevance Feedback & Query Expansion
CSE 421: Introduction to Algorithms
LING/C SC 581: Advanced Computational Linguistics
LING/C SC 581: Advanced Computational Linguistics
(1) Breadth-First Search  S Queue S
Lecture 19 Word Meanings II
LING/C SC 581: Advanced Computational Linguistics
Dynamic Word Sense Disambiguation with Semantic Similarity
Time Complexity and the divide and conquer strategy
Presentation transcript:

LING/C SC 581: Advanced Computational Linguistics Lecture 12 Feb 19th

Administrivia Hope you sent feedback on the last lecture on HMMs by Tatjana Scheffler. This Thursday (Feb 21st), we have another guest lecture from faculty candidate Marcos Zampieri. His job talk on "Automatic Identification of Similar Languages, Varieties, and Dialects: Between traditional and deep learning models" is tomorrow at noon in CHEM 209

Last Time: Perl Interface to WordNet 3.0

Last Time: Perl Interface to WordNet 3.0 Files: bfs.perl (basic code) bfs4.perl (all minimal length solutions) Example: perl bfs4.perl lorry#n#1 car#n#1 Found at distance 5 (1011 nodes explored) car#n#1 hypo motor_vehicle#n#1 hypo self-propelled_vehicle#n#1 hypo wheeled_vehicle#n#1 hype wagon#n#1 hype lorry#n#1 All minimal solutions found

cpanm on Ubuntu sudo apt-get install cpanminus which cpanm /usr/bin/cpanm sudo cpanm WordNet::QueryData sudo apt-get install pmtools

WordNet::QueryData on Ubuntu

WordNet Verb senses destroy#v#1-4

Framenet: destroy https://framenet2.icsi.berkeley.edu/fnReports/data/frameIndex.xml?frame=Destroying https://framenet2.icsi.berkeley.edu/fnReports/data/frameIndex.xml?frame=Killing https://framenet2.icsi.berkeley.edu/fnReports/data/frameIndex.xml?frame=Stimulate_emotion

Framenet https://framenet.icsi.berkeley.edu/fndrupal/

WordNet Verb senses: destroy Coordinate terms (up 1, down 1)

WordNet Verb senses: destroy Troponyms (ways to):

WordNet Verb senses: destroy Derivationally related to (parts of speech):

WordNet Adjective senses: happy

WordNet Adjective senses: happy Antonyms: unhappy#a#1 happy#a#1

WordNet Adjective senses: happy Value of: Related to:

WordNet Adjective senses: happy Pertains to: in old WordNet version (1.7.1) abaxial see also axial no connection here… as we’ll see

A simple program

perldoc WordNet::QueryData Start up use WordNet::QueryData; my $wn = WordNet::QueryData->new( noload => 1); noload => 0 (caches indexes in computer memory, slower startup, faster lookup time)

perldoc WordNet::QueryData querySense, queryWord 1st argument (1) word returns list of word#pos Example: $wn-­‐>querySense("run")  Answer: run#n, run#v (2) word#pos returns list of word#pos#sense Example: $wn-­‐>querySense("run#v")  Answer: run#v#1, run#v#2, run#v#3, run#v#4, run#v#5, run#v#6, run#v#7, run#v#8, run#v#9, run#v#10, run#v#11, run#v#12, run#v#13, run#v#14, run#v#15, run#v#16, run#v#17, run#v#18, run#v#19, run#v#20, run#v#21, run#v#22, run#v#23, run#v#24, run#v#25, run#v#26, run#v#27, run#v#28, run#v#29, run#v#30, run#v#31, run#v#32, run#v#33, run#v#34, run#v#35, run#v#36, run#v#37, run#v#38, run#v#39, run#v#40, run#v#41 (3) word#pos#sense + 2nd argument: a relation

perldoc WordNet::QueryData querySense, queryWord 1st argument (3) word#pos#sense + 2nd argument: a relation returns list of word#pos#sense Example: $wn-->querySense("cat#n#1", "hypo") Answer: domestic_cat#n#1, wildcat#n#3

perldoc WordNet::QueryData To find other members of the synsets: perl cat.perl domestic_cat#n#1 house_cat#n#1 Felis_domesticus#n#1 Felis_catus#n#1 wildcat#n#3

perldoc WordNet::QueryData Possible relations for queryWord: “also” - also see “ants” – antonyms “deri” - derived forms (nouns and verbs only) “part” - participle of verb (adjectives only) “pert” - pertainym (pertains to noun) (adjectives only) “vgrp” - verb group (verbs only)

perldoc WordNet::QueryData Possible relations for querySense: also - also see glos - word definition syns - synset words hype – hypernyms inst - instance of hypes - hypernyms and "instance of” hypo – hyponyms hasi - has instance hypos - hyponums and "has instance” mmem - member meronyms msub - substance meronyms mprt - part meronyms mero - all meronyms hmem - member holonyms hsub - substance holonyms hprt - part holonyms holo - all holonyms attr - attributes (?) sim - similar to (adjectives only) enta - entailment (verbs only) caus - cause (verbs only) domn - domain – all dmnc - domain – category dmnu - domain – usage dmnr - domain – region domt - member of domain - all (nouns only) dmtc - member of domain - category (nouns only) dmtu - member of domain - usage (nouns only) dmtr - member of domain - region (nouns only)

perldoc WordNet::QueryData validForms: 1 argument word or word#pos It returns a list of all alternate forms (alternate spellings, conjugations, plural/singular forms, etc.). perl validforms.perl go#v Note: in documentation “lay down#v” returns lay_down#v, lie_down#v “bank” returns bank#n bank#v

perldoc WordNet::QueryData level: one argument word#pos#sense 13. 8. 7. 3. 1.

wnb (WordNet browser) Exercise: find the relationship between minibike and convertible

Programmed search Program Semantic Relations $max Note bfs.perl 4 querySense 20K basic breadth-first search, displays (shortest) path length bfs2.perl displays path as well as path length bfs3.perl 6 querySense 4 queryWord 100K bfs4.perl CMDLINE PARAMETERS 1. word#pos#sense 2. word#pos#sense OPTIONAL $max can be set using a 3rd cmdline parameter for bfs4.perl

Programmed search We can write a program to find the minimum distance between word senses: bfs.perl (on website)

Programmed search mark is used to count the depth of breadth-first search hash %seen holds already visited nodes so we don’t loop semantic distance = depth of breadth-first search when $end is matched

Programmed search Example Synset: minibike#n#1 motorbike#n#1

Programmed search get node to expand bookkeeping for depth of search record node as seen Recall Perl array: end (push/pop), beginning (shift/unshift)

Programmed search node is related to newnode via rel increment node count if $end is found, jump out of nested loop up to scope FOUND if we haven’t seen newnode before, queue it for later expansion

Programmed search only two ways to get to the end of the program, either we found our target node $end or $n is no longer < $max