Lecture 22 Word Similarity Topics word similarity Thesaurus based word similarity Intro. Distributional based word similarityReadings: NLTK book Chapter.

Slides:



Advertisements
Similar presentations
Albert Gatt Corpora and Statistical Methods Lecture 13.
Advertisements

Semi-Supervised Learning & Summary Advanced Statistical Methods in NLP Ling 572 March 8, 2012.
1 Extended Gloss Overlaps as a Measure of Semantic Relatedness Satanjeev Banerjee Ted Pedersen Carnegie Mellon University University of Minnesota Duluth.
SI485i : NLP Set 11 Distributional Similarity slides adapted from Dan Jurafsky and Bill MacCartney.
Word sense disambiguation and information retrieval Chapter 17 Jurafsky, D. & Martin J. H. SPEECH and LANGUAGE PROCESSING Jarmo Ritola -
Tagging with Hidden Markov Models. Viterbi Algorithm. Forward-backward algorithm Reading: Chap 6, Jurafsky & Martin Instructor: Paul Tarau, based on Rada.
Word Sense Disambiguation Ling571 Deep Processing Techniques for NLP February 28, 2011.
Word Sense Disambiguation Ling571 Deep Processing Techniques for NLP February 23, 2011.
Search and Retrieval: More on Term Weighting and Document Ranking Prof. Marti Hearst SIMS 202, Lecture 22.
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.
Semi-supervised learning and self-training LING 572 Fei Xia 02/14/06.
CS Word Sense Disambiguation. 2 Overview A problem for semantic attachment approaches: what happens when a given lexeme has multiple ‘meanings’?
CS 4705 Lecture 19 Word Sense Disambiguation. Overview Selectional restriction based approaches Robust techniques –Machine Learning Supervised Unsupervised.
Collective Word Sense Disambiguation David Vickrey Ben Taskar Daphne Koller.
1 Noun Homograph Disambiguation Using Local Context in Large Text Corpora Marti A. Hearst Presented by: Heng Ji Mar. 29, 2004.
Presented by Zeehasham Rasheed
CS 4705 Word Sense Disambiguation. Overview Selectional restriction based approaches Robust techniques –Machine Learning Supervised Unsupervised –Dictionary-based.
Distributional Clustering of English Words Fernando Pereira- AT&T Bell Laboratories, 600 Naftali Tishby- Dept. of Computer Science, Hebrew University Lillian.
LSA 311 Computational Lexical Semantics Dan Jurafsky Stanford University Lecture 2: Word Sense Disambiguation.
(Some issues in) Text Ranking. Recall General Framework Crawl – Use XML structure – Follow links to get new pages Retrieve relevant documents – Today.
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
Personalisation Seminar on Unlocking the Secrets of the Past: Text Mining for Historical Documents Sven Steudter.
Corpus-Based Approaches to Word Sense Disambiguation
Computational Lexical Semantics Lecture 8: Selectional Restrictions Linguistic Institute 2005 University of Chicago.
Unsupervised Word Sense Disambiguation Rivaling Supervised Methods Oh-Woog Kwon KLE Lab. CSE POSTECH.
2007. Software Engineering Laboratory, School of Computer Science S E Towards Answering Opinion Questions: Separating Facts from Opinions and Identifying.
Text Classification, Active/Interactive learning.
Lecture 6 Hidden Markov Models Topics Smoothing again: Readings: Chapters January 16, 2013 CSCE 771 Natural Language Processing.
Jennie Ning Zheng Linda Melchor Ferhat Omur. Contents Introduction WordNet Application – WordNet Data Structure - WordNet FrameNet Application – FrameNet.
1 Statistical NLP: Lecture 9 Word Sense Disambiguation.
W ORD S ENSE D ISAMBIGUATION By Mahmood Soltani Tehran University 2009/12/24 1.
SYMPOSIUM ON SEMANTICS IN SYSTEMS FOR TEXT PROCESSING September 22-24, Venice, Italy Combining Knowledge-based Methods and Supervised Learning for.
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.
Enhancing Cluster Labeling Using Wikipedia David Carmel, Haggai Roitman, Naama Zwerdling IBM Research Lab (SIGIR’09) Date: 11/09/2009 Speaker: Cho, Chin.
Wikipedia as Sense Inventory to Improve Diversity in Web Search Results Celina SantamariaJulio GonzaloJavier Artiles nlp.uned.es UNED,c/Juan del Rosal,
Lecture 21 Computational Lexical Semantics Topics Features in NLTK III Computational Lexical Semantics Semantic Web USCReadings: NLTK book Chapter 10 Text.
Creating Subjective and Objective Sentence Classifier from Unannotated Texts Janyce Wiebe and Ellen Riloff Department of Computer Science University of.
Number Sense Disambiguation Stuart Moore Supervised by: Anna Korhonen (Computer Lab)‏ Sabine Buchholz (Toshiba CRL)‏
Automatic recognition of discourse relations Lecture 3.
©2012 Paula Matuszek CSC 9010: Text Mining Applications Lab 3 Dr. Paula Matuszek (610)
1 Measuring the Semantic Similarity of Texts Author : Courtney Corley and Rada Mihalcea Source : ACL-2005 Reporter : Yong-Xiang Chen.
Lecture 24 Distributional Word Similarity II Topics Distributional based word similarity example PMI context = syntactic dependenciesReadings: NLTK book.
1 Gloss-based Semantic Similarity Metrics for Predominant Sense Acquisition Ryu Iida Nara Institute of Science and Technology Diana McCarthy and Rob Koeling.
From Words to Senses: A Case Study of Subjectivity Recognition Author: Fangzhong Su & Katja Markert (University of Leeds, UK) Source: COLING 2008 Reporter:
Event-Based Extractive Summarization E. Filatova and V. Hatzivassiloglou Department of Computer Science Columbia University (ACL 2004)
Lecture 24 Distributiona l based Similarity II Topics Distributional based word similarityReadings: NLTK book Chapter 2 (wordnet) Text Chapter 20 April.
Learning Event Durations from Event Descriptions Feng Pan, Rutu Mulkar, Jerry R. Hobbs University of Southern California ACL ’ 06.
Overview of Statistical NLP IR Group Meeting March 7, 2006.
NTNU Speech Lab 1 Topic Themes for Multi-Document Summarization Sanda Harabagiu and Finley Lacatusu Language Computer Corporation Presented by Yi-Ting.
Multi-Class Sentiment Analysis with Clustering and Score Representation Yan Zhu.
Intro to NLP - J. Eisner1 Splitting Words a.k.a. “Word Sense Disambiguation”
SENSEVAL: Evaluating WSD Systems
Sentiment analysis algorithms and applications: A survey
Lecture 24 Distributional Word Similarity II
Word Meaning and Similarity
CSC 594 Topics in AI – Natural Language Processing
Lecture 21 Computational Lexical Semantics
Lecture 22 Word Similarity
Statistical NLP: Lecture 9
WordNet WordNet, WSD.
Introduction Task: extracting relational facts from text
A method for WSD on Unrestricted Text
Lecture 22 Word Similarity
CS224N Section 3: Corpora, etc.
Unsupervised Word Sense Disambiguation Using Lesk algorithm
Statistical NLP : Lecture 9 Word Sense Disambiguation
Presentation transcript:

Lecture 22 Word Similarity Topics word similarity Thesaurus based word similarity Intro. Distributional based word similarityReadings: NLTK book Chapter 2 (wordnet) Text Chapter 20 April 8, 2013 CSCE 771 Natural Language Processing

– 2 – CSCE 771 Spring 2013 Overview Last Time (Programming) Features in NLTK NL queries  SQL NLTK support for Interpretations and Models Propositional and predicate logic support Prover9Today Last Lectures slides Features in NLTK Computational Lexical SemanticsReadings: Text 19,20 NLTK Book: Chapter 10 Next Time: Computational Lexical Semantics II

– 3 – CSCE 771 Spring 2013 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

– 4 – CSCE 771 Spring 2013 Feature Extraction for WSD Feature vectors Collocation [w i-2, POS i-2, w i-1, POS i-1, w i, POS i, w i+1, POS i+1, w i+2, POS i+2 ] [w i-2, POS i-2, w i-1, POS i-1, w i, POS i, w i+1, POS i+1, w i+2, POS i+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 3 rd and 7 th most freq. content word Window of nearby words/features

– 5 – CSCE 771 Spring 2013 Naïve Bayes Classifier w – word vector s – sense tag vector f – feature vector [w i, POS i ] for i=1, …n Approximate by frequency counts But how practical?

– 6 – CSCE 771 Spring 2013 Looking for Practical formula. Still not practical

– 7 – CSCE 771 Spring 2013 Naïve == Assume Independence Now practical, but realistic?

– 8 – CSCE 771 Spring 2013 Training = count frequencies. Maximum likelihood estimator (20.8)

– 9 – CSCE 771 Spring 2013 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

– 10 – CSCE 771 Spring 2013 Figure 20.2 Decision List Classifier Rules

– 11 – CSCE 771 Spring 2013 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

– 12 – CSCE 771 Spring 2013 Similarity of Words or Senses  generally we will be saying words but giving similarity of word senses  similarity vs relatedness  ex similarity  ex relatedness  Similarity of words  Similarity of phrases/sentence (not usually done)

– 13 – CSCE 771 Spring 2013 Figure 20.3 Simplified Lesk Algorithm gloss/sentence overlap

– 14 – CSCE 771 Spring 2013 Simplified Lesk example The bank can guarantee deposits will eventually cover future tuition costs because it invests in adjustable rate mortgage securities.

– 15 – CSCE 771 Spring 2013 Corpus Lesk  Using equals weights on words just does not seem right  weights applied to overlap words  inverse document frequency idf i = log (N docs / num docs containing w i )

– 16 – CSCE 771 Spring 2013 SENSEVAL competitions Check the Senseval-3 website.Senseval-3

– 17 – CSCE 771 Spring 2013 SemEval-2 -Evaluation Exercises on Semantic Evaluation - ACL SigLex eventSigLex SemEval-2 -Evaluation Exercises on Semantic Evaluation - ACL SigLex eventSigLex

– 18 – CSCE 771 Spring 2013 Task NameArea #1Coreference Resolution in Multiple Languages Coref #2Cross-Lingual Lexical SubstitutionCross-Lingual, Lexical Substitu #3Cross-Lingual Word Sense DisambiguationCross-Lingual, Word Senses #4VP Ellipsis - Detection and ResolutionEllipsis #5Automatic Keyphrase Extraction from Scientific Articles #6Classification of Semantic Relations between MeSH Entities in Swedish Medical Texts #7Argument Selection and CoercionMetonymy #8Multi-Way Classification of Semantic Relations Between Pairs of Nominals #9Noun Compound Interpretation Using Paraphrasing VerbsNoun compounds #10Linking Events and their Participants in Discourse Semantic Role Labeling, Information Extraction #11Event Detection in Chinese News SentencesSemantic Role Labeling, Word Senses #12Parser Training and Evaluation using Textual Entailment #13TempEval 2Time Expressions #14Word Sense Induction #15Infrequent Sense Identification for Mandarin Text to Speech Systems #16Japanese WSDWord Senses #17All-words Word Sense Disambiguation on a Specific Domain (WSD-domain) #18Disambiguating Sentiment Ambiguous AdjectivesWord Senses, Sentim

– 19 – CSCE 771 Spring Selectional Restrictions and Preferences verb eat  theme=object has feature Food+verb eat  theme=object has feature Food+ Katz and Fodor 1963 used this idea to rule out senses that were not consistentKatz and Fodor 1963 used this idea to rule out senses that were not consistent WSD of diskWSD of disk (20.12) “In out house, evrybody has a career and none of them includes washing dishes,” he says. (20.13) In her tiny kitchen, Ms, Chen works efficiently, stir-frying several simple dishes, inlcuding … Verbs wash, stir-fryingVerbs wash, stir-frying wash  washable+ stir-frying  edible+

– 20 – CSCE 771 Spring 2013 Resnik’s model of Selectional Association How much does a predicate tell you about the semantic class of its arguments? eat eat  was, is, to be … was, is, to be …  selectional preference strength of a verb is indicated by two distributions:selectional preference strength of a verb is indicated by two distributions: 1.P(c) how likely the direct object is to be in class c 2.P(c|v) the distribution of expected semantic classes for the particular verb v the greater the difference in these distributions means the verb provides more informationthe greater the difference in these distributions means the verb provides more information

– 21 – CSCE 771 Spring 2013 Relative entropy – Kullback-Leibler divergence Given two distributions P and Q D(P || Q) =∑ P(x) log (p(x)/Q(x)) (eq 20.16) Selectional preference S R (v) = D( P(c|v) || P(c)) =

– 22 – CSCE 771 Spring 2013 Resnik’s model of Selectional Association

– 23 – CSCE 771 Spring 2013 High and Low Selectional Associations – Resnik 1996 Selectional Associations

– 24 – CSCE 771 Spring Minimally Supervised WSD: Bootstrapping  “supervised and dictionary methods require large hand-built resources”  bootstrapping or semi-supervised learning or minimally supervised learning to address the no-data problem  Start with seed set and grow it.

– 25 – CSCE 771 Spring 2013 Yarowsky algorithm preliminaries Idea of bootstrapping: “create a larger training set from a small set of seeds” Heuritics: senses of “bass” 1.one sense per collocation in a sentence both senses of bass are not used 2.one sense per discourse Yarowsky showed that of 37,232 examples of bass occurring in a discourse there was only one sense per discourseYarowsky

– 26 – CSCE 771 Spring 2013 Yarowsky algorithm Goal: learn a word-sense classifier for a word Input: Λ 0 small seed set of labeled instances of each sense 1.train classifier on seed-set Λ 0, 2.label the unlabeled corpus V 0 with the classifier 3.Select examples delta in V that you are “most confident in” 4.Λ 1 = Λ 0 + delta 5.Repeat

– 27 – CSCE 771 Spring 2013 Figure 20.4 Two senses of plant Plant 1 – manufacturing plant … plant 2 – flora, plant life

– 28 – CSCE 771 Spring Survey of WSD by Navigili, iroma1.it/~navigli/pubs/ACM_Survey_2009_Navigli.pdf

– 29 – CSCE 771 Spring 2013 Figure 20.5 Samples of bass-sentences from WSJ (Wall Street Journal)

– 30 – CSCE 771 Spring 2013 Word Similarity: Thesaurus Based Methods Figure 20.6 Path Distances in hierarchy Wordnet of course (pruned)

– 31 – CSCE 771 Spring 2013 Figure 20.6 Path Based Similarity.\ sim path (c 1, c 2 )= 1/pathlen(c 1, c 2 ) (length + 1)

– 32 – CSCE 771 Spring 2013 WN -hierarchy # Wordnet examples from NLTK book import nltk from nltk.corpus import wordnet as wn right = wn.synset('right_whale.n.01') orca = wn.synset('orca.n.01') minke = wn.synset('minke_whale.n.01') tortoise = wn.synset('tortoise.n.01') novel = wn.synset('novel.n.01') print "LCS(right, minke)=",right.lowest_common _hypernyms(minke) print "LCS(right, orca)=",right.lowest_common_h ypernyms(orca) print "LCS(right, tortoise)=",right.lowest_commo n_hypernyms(tortoise) print "LCS(right, novel)=", right.lowest_common_hyperny ms(novel)

– 33 – CSCE 771 Spring 2013 #path similarity print "Path similarities" print right.path_similarity(minke) print right.path_similarity(orca) print right.path_similarity(tortoise) print right.path_similarity(novel) Path similarities

– 34 – CSCE 771 Spring 2013 Wordnet in NLTK   ml (partially in Chap 02 NLTK book; but different version) ml ml   code for similarity – runs for a while; lots of results  x

– 35 – CSCE 771 Spring beautiful 3/4/10 Hi, I was wondering if it is possible for me to use NLTK + wordnet to group (nouns) words together via similar meanings? Assuming I have 2000 words or topics. Is it possible for me to group them together according to similar meanings using NLTK? So that at the end of the day I would have different groups of words that are similar in meaning? Can that be done in NLTK? and possibly be able to detect salient patterns emerging? (trend in topics etc...). Is there a further need for a word classifier based on the CMU BOW toolkit to classify words to get it into categories? or the above group would be good enough? Is there a need to classify words further? How would one classify words in NLTK effectively? Really hope you can enlighten me? FM

– 36 – CSCE 771 Spring 2013 Response from Steven Bird Steven Bird 3/7/ /3/5 Republic : > Assuming I have 2000 words or topics. Is it possible for me to group > them together according to similar meanings using NLTK? You could compute WordNet similarity (pairwise), so that each word/topic is represented as a vector of distances, which could then be discretized, so each vector would have a form like this: [0,2,3,1,0,0,2,1,3,...]. These vectors could then be clustered using one of the methods in the NLTK cluster package. > So that at the end of the day I would have different groups of words > that are similar in meaning? Can that be done in NLTK? and possibly be > able to detect salient patterns emerging? (trend in topics etc...). This suggests a temporal dimension, which might mean recomputing the clusters as more words or topics come in. It might help to read the NLTK book sections on WordNet and on text classification, and also some of the other cited material. -Steven Bird

– 37 – CSCE 771 Spring 2013 More general? Stack-Overflow import nltk from nltk.corpus import wordnet as wn waiter = wn.synset('waiter.n.01') employee = wn.synset('employee.n.01') all_hyponyms_of_waiter = list(set([w.replace("_"," ") for s in waiter.closure(lambda s:s.hyponyms()) for s in waiter.closure(lambda s:s.hyponyms()) for w in s.lemma_names])) for w in s.lemma_names])) all_hyponyms_of_employee = … if 'waiter' in all_hyponyms_of_employee: print 'employee more general than waiter' print 'employee more general than waiter' elif 'employee' in all_hyponyms_of_waiter: print 'waiter more general than employee' print 'waiter more general than employee'else:

– 38 – CSCE 771 Spring 2013 print wn(help) … | res_similarity(self, synset1, synset2, ic, verbose=False) | res_similarity(self, synset1, synset2, ic, verbose=False) | Resnik Similarity: | Resnik Similarity: | Return a score denoting how similar two word senses are, based on the | Return a score denoting how similar two word senses are, based on the | Information Content (IC) of the Least Common Subsumer (most specific | Information Content (IC) of the Least Common Subsumer (most specific | ancestor node). | ancestor node). 

– 39 – CSCE 771 Spring 2013 Similarity based on a hierarchy (=ontology)

– 40 – CSCE 771 Spring 2013 Information Content word similarity

– 41 – CSCE 771 Spring 2013 Resnick Similarity / Wordnet sim resnick (c1, c2) = -log P(LCS(c1, c2))\ wordnet res_similarity(self, synset1, synset2, ic, verbose=False) | Resnik Similarity: | Resnik Similarity: | Return a score denoting how similar two word senses are, based on the | Return a score denoting how similar two word senses are, based on the | Information Content (IC) of the Least Common Subsumer (most specific | Information Content (IC) of the Least Common Subsumer (most specific | ancestor node). | ancestor node).

– 42 – CSCE 771 Spring 2013 Fig 20.7 Wordnet with Lin P(c) values Change for Resnick!!

– 43 – CSCE 771 Spring 2013 Lin variation 1998 Commonality –Commonality – Difference –Difference – IC(description(A,B)) – IC(common(A,B))IC(description(A,B)) – IC(common(A,B)) sim Lin (A,B) = Common(A,B) / description(A,B)sim Lin (A,B) = Common(A,B) / description(A,B)

– 44 – CSCE 771 Spring 2013 Fig 20.7 Wordnet with Lin P(c) values

– 45 – CSCE 771 Spring 2013 Extended Lesk based on 1. glosses 2. glosses of hypernyms, hyponymsExample drawing paper: paper that is specially prepared for use in draftingdrawing paper: paper that is specially prepared for use in drafting decal: the art of transferring designs from specially prepared paper to a wood, glass or metal surface.decal: the art of transferring designs from specially prepared paper to a wood, glass or metal surface. Lesk score = sum of squares of lengths of common phrasesLesk score = sum of squares of lengths of common phrases Example: = 5Example: = 5

– 46 – CSCE 771 Spring 2013 Figure 20.8 Summary of Thesaurus Similarity measures

– 47 – CSCE 771 Spring 2013 Wordnet similarity functions path_similarity()? lch_similarity()? lch_similarity()? wup_similarity()? wup_similarity()? res_similarity()? res_similarity()? jcn_similarity()? jcn_similarity()? lin_similarity()? lin_similarity()?

– 48 – CSCE 771 Spring 2013 Problems with thesaurus-based  don’t always have a thesaurus  Even so problems with recall  missing words  phrases missing  thesauri work less well for verbs and adjectives  less hyponymy structure Distributional Word Similarity D. Jurafsky

– 49 – CSCE 771 Spring 2013 Distributional models of meaning  vector-space models of meaning  offer higher recall than hand-built thesauri  less precision probably Distributional Word Similarity D. Jurafsky

– 50 – CSCE 771 Spring 2013 Word Similarity Distributional Methods tezguino example A bottle of tezguino is on the table.A bottle of tezguino is on the table. Everybody likes tezguino.Everybody likes tezguino. tezguino makes you drunk.tezguino makes you drunk. We make tezguino out of corn.We make tezguino out of corn. What do you know about tezguino?What do you know about tezguino?

– 51 – CSCE 771 Spring 2013 Term-document matrix  Collection of documents  Identify collection of important terms, discriminatory terms(words)  Matrix: terms X documents –  term frequency tf w,d =  each document a vector in Z V :  Z= integers; N=natural numbers more accurate but perhaps misleading  Example Distributional Word Similarity D. Jurafsky

– 52 – CSCE 771 Spring 2013 Example Term-document matrix Subset of terms = {battle, soldier, fool, clown} Distributional Word Similarity D. Jurafsky As you like it12 th NightJulius CaesarHenry V Battle11815 Soldier fool clown611700

– 53 – CSCE 771 Spring 2013 Figure 20.9 Term in context matrix for word similarity window of 20 words – 10 before 10 after from Brown corpus

– 54 – CSCE 771 Spring 2013 Pointwise Mutual Information td-idf (inverse document frequency) rating instead of raw countstd-idf (inverse document frequency) rating instead of raw counts idf intuition again – pointwise mutual information (PMI)pointwise mutual information (PMI) Do events x and y occur more than if they were independent? PMI(X,Y)= log2 P(X,Y) / P(X)P(Y) PMI between wordsPMI between words Positive PMI between two words (PPMI)Positive PMI between two words (PPMI)

– 55 – CSCE 771 Spring 2013 Computing PPMI  Matrix with W (words) rows and C (contexts) columns  f ij is frequency of w i in c j,

– 56 – CSCE 771 Spring 2013 Example computing PPMI.

– 57 – CSCE 771 Spring 2013 Figure 20.10

– 58 – CSCE 771 Spring 2013 Figure 20.11

– 59 – CSCE 771 Spring 2013 Figure 20.12

– 60 – CSCE 771 Spring 2013 Figure 20.13

– 61 – CSCE 771 Spring 2013 Figure 20.14

– 62 – CSCE 771 Spring 2013 Figure 20.15

– 63 – CSCE 771 Spring 2013 Figure 20.16

– 64 – CSCE 771 Spring how to do in nltk NLTK 3.0a1 released : February 2013 This version adds support for NLTK’s graphical user interfaces. This version adds support for NLTK’s graphical user interfaces. which similarity function in nltk.corpus.wordnet is Appropriate for find similarity of two words? I want use a function for word clustering and yarowsky algorightm for find similar collocation in a large text.