Understanding Words in Context: Distributional Modeling by Katrin Erk

distributional models n.w
1 / 29
Embed
Share

Learn about distributional models by Katrin Erk where word meanings are derived from observing words in context. Explore word associations in various contexts to understand semantic relationships and language structures.

  • Word Meaning
  • Distributional Modeling
  • Katrin Erk
  • Context Analysis
  • Semantic Relationships

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Distributional models Katrin Erk

  2. You can get an idea of what a word means from observing it in context He filled the wampimuk, passed it around, and we all drank some We found a little hairy wampimuk sleeping behind a tree. (examples by Marco Baroni) Distributional modeling: Represent the meaning of a word through the contexts in which it is observed Similar words appear in similar contexts 2

  3. What words can appear in these contexts? Word 1: drown, bathroom, shower, fill, fall, lie, electrocute, toilet, whirlpool, iron, gin Word 2: eat, fall, pick, slice, peel, tree, throw, fruit, pie, bite, crab, grate Word 3: advocate, overthrow, establish, citizen, ideal, representative, dictatorship, campaign, bastion, freedom Word 4: spend, enjoy, remember, last, pass, end, die, happen, brighten, relive

  4. What words can appear in these contexts? bathtub apple Word 1: drown, bathroom, shower, fill, fall, lie, electrocute, toilet, whirlpool, iron, gin Word 2: eat, fall, pick, slice, peel, tree, throw, fruit, pie, bite, crab, grate democracy Word 3: advocate, overthrow, establish, citizen, ideal, representative, dictatorship, campaign, bastion, freedom day Word 4: spend, enjoy, remember, last, pass, end, die, happen, brighten, relive

  5. What can you say about word number 5? bathtub appl e Word 1: drown, bathroom, shower, fill, fall, lie, electrocute, toilet, whirlpool, iron, gin Word 2: eat, fall, ripe, slice, peel, tree, throw, fruit, pie, bite, crab, grate day Word 4: spend, enjoy, remember, last, pass, end, die, happen, brighten, relive democracy Word 3: advocate, overthrow, establish, citizen, ideal, representative, dictatorship, campaign, bastion, freedom Word 5: eat, paint, peel, apple, fruit, juice, lemon, blue, grow

  6. What can you say about word number 5? bathtub appl e Word 1: drown, bathroom, shower, fill, fall, lie, electrocute, toilet, whirlpool, iron, gin Word 2: eat, fall, ripe, slice, peel, tree, throw, fruit, pie, bite, crab, grate day Word 4: spend, enjoy, remember, last, pass, end, die, happen, brighten, relive democracy Word 3: advocate, overthrow, establish, citizen, ideal, representative, dictatorship, campaign, bastion, freedom orange Word 5: eat, paint, peel, apple, fruit, juice, lemon, blue, grow

  7. Describing meaning through context Similar words appear in similar contexts apple, orange Measure similarity in meaning as similarity in contexts Caveat: If a word has multiple meanings, like orange , it will appear in a mixture of contexts How to describe the contexts of a word? Count other words nearby

  8. Counting context words for apple They picked up red apples that had fallen to the ground She atea red apple Pick an apple. Eating apples is healthy Word count, 3-word context window, lemmatized a 2 be 1 eat 2 fall 1 have 1 healthy 1 pick 2 red 2 that 1 up 1

  9. How can we compare two context word counts? Count how often apple occurs close to other words in a large text collection (corpus): eat 794 fall 244 ripe 47 slice 221 peel 208 tree 160 throw 145 fruit pie 156 bite 104 crab 88 109 Interpret counts as coordinates: Every context word becomes a dimension. fall apple eat

  10. How can we compare two context word counts? Count how often apple occurs close to other words in a large text collection (corpus): eat 794 fall 244 ripe 47 slice 221 peel 208 tree 160 throw 145 fruit pie 156 bite 104 crab 88 109 Do the same for orange : eat 265 fall 22 ripe 25 slice 62 peel 220 tree 64 throw 74 fruit pie 111 bite 4 crab 8 4

  11. How can we compare two context word counts? Then visualize both count tables as vectors in the same space: eat 794 fall 244 ripe 47 slice 221 peel 208 tree 160 throw 145 fruit pie 156 bite 104 crab 88 109 eat 265 fall 22 ripe 25 slice 62 peel 220 tree 64 throw 74 fruit pie 111 bite 4 crab 8 4 fall apple Similarity between two words as proximity in space orange eat

  12. How can we compare two context word counts? Then visualize both count tables as vectors in the same space: eat 794 fall 244 ripe 47 slice 221 peel 208 tree 160 throw 145 fruit pie 156 bite 104 crab 88 109 eat 265 fall 22 ripe 25 slice 62 peel 220 tree 64 throw 74 fruit pie 111 bite 4 crab 8 4 fall apple Similarity between two words as proximity in space orange eat

  13. What do we mean by similarity of vectors? Euclidean distance (a dissimilarity measure!): apple orange

  14. Problem with Euclidean distance: very sensitive to word frequency! apple Braeburn

  15. What do we mean by similarity of vectors? Cosine similarity: apple Use angle between vectors instead of point distance to get around word frequency issues orange

  16. Using distributional models Predicting word similarity (WordSim353): doctor nurse 7.00 professor doctor 6.62 student professor 6.81 smart student 4.62 smart stupid 5.81 Similar: synonyms antonyms topically related words Doing the TOEFL test: provisions 1. stipulations 2. interrelations 3. jurisdictions 4. interpretations

  17. Using distributional models Predicting priming effects free associations Finding (near-)synonyms: automatically building a thesaurus Related: use distributional similarity of documents (containing similar words) in Information Retrieval

  18. Corpora in which to count words Corpus = text collection What works best for computing a distributional model? Moby Dick 2 years of the Wall Street Journal A collection of dating ads A collection of webpage texts

  19. Corpora in which to count words Need to be available electronically Best possible match for today s English language in general Mixture of genres Mixture of authors Spoken and written Larger is better

  20. Corpora in which to count (English) words Brown Corpus 1 million words Balanced corpus, mixture of genres British National Corpus 100 million words Balanced corpus, mixture of genres, spoken and written

  21. Corpora in which to count (English) words English Gigaword corpus 1 billion words Short news articles Wikipedia dump 2 billion words UKWaC (UK web as corpus) 2 billion words Collection of webpages ending in .uk

  22. What can we do with our word counts? blackboard

  23. Background in philosophy of language: Wittgenstein, meaning as use Man kan fu r eine gro e Klasse von Fa llen der Benu tzung des Wortes Bedeutung wenn auch nicht fu r alle Fa lle seiner Benu tzung dieses Wort so erkla ren: Die Bedeutung eines Wortes ist sein Gebrauch in der Sprache. -- Wittgenstein, Philosophical Investigations For a large class of cases though not for all in which we employ the word meaning it can be explained thus: the meaning of a word is its use in the language. (translation: Anscombe/Stokhof)

  24. Background in linguistics: Harris and Firth Zellig Harris (1957): Classify linguistic units by observing the contexts they occur in phonemes morphemes phrase types: noun phrase, verb phrase Not specifically about semantics John Firth (1957): collocations identify senses of a word by looking at groups of contexts in which it appears You shall know a word by the company it keeps

  25. Background in psychology Landauer/Dumais 1998: A solution to Plato s problem How come you know so many words? A typical American seventh grader knows the meaning of 10-15 words today that she did not know yesterday. She must have acquired most of them as a result of reading because (a) the majority of English words are used only in print, (b) she already knew well almost all the words she would have encoun- tered in speech, and (c) she learned less than one word by direct instruction.

  26. Background in psychology Many phenomena to do with word meaning can be simulated with distributional models Word similarity ratings (WordSim353): doctor nurse 7.00 professor doctor 6.62 student professor 6.81 smart student 4.62 smart stupid 5.81 How would you simulate this with a distributional model?

  27. Background in psychology Many phenomena to do with word meaning can be simulated with distributional models Priming Hearing one word makes you react faster to a related word Hodgson data: election vote dove peace vase flower NOT: election peace How would you simulate that with a distributional model?

  28. Background in psychology Are our mental representations of words, of concepts distributional? Do they represent the contexts in which a word has been encountered? Does the meaning of a word depend on the contexts in which it is used?

  29. Background in psychology Concepts as distributional: Yes (Landauer and others): How else would we learn so many words? Text as one of the main ways in which we encounter words No (Barsalou and others): Perception is central to how we represent concepts Distributional and perceptual (Andrews/Vigliocco/Vinson and others) Both types of information seems to be relevant Simulations: Combining both makes for a better model

More Related Content