distributional semantics
play

Distributional Semantics LING 571 Deep Processing Methods in NLP - PowerPoint PPT Presentation

Distributional Semantics LING 571 Deep Processing Methods in NLP November 4, 2019 Shane Steinert-Threlkeld 1 Walking the Walk Ski Chomp = Chomsky! 2 Punny Department 3 Recap: What is a word? Acoustically or orthographically


  1. Distributional Semantics LING 571 — Deep Processing Methods in NLP November 4, 2019 Shane Steinert-Threlkeld 1

  2. Walking the Walk Ski Chomp = Chomsky! 2

  3. Punny Department 3

  4. Recap: What is a word? ● Acoustically or orthographically similar → can have different meanings! ● Acoustically or orthographically different → can have similar meanings! 4

  5. Recap: What is a word? ● Words can also have relationships that cover: ● Different shades of meaning ● Part-Whole relationships 5

  6. Recap: What is a word? ● For now, we will set aside homonyms ● (Specifically, homographs ) ● Investigate word meaning as we can model it as (dis-) similarity 6

  7. Distributional Similarity 7

  8. Distributional Similarity ● “You shall know a word by the company it keeps!” ( Firth, 1957 ) ● A bottle of tezgüino is on the table. ● Everybody likes tezgüino . ● T ezgüino makes you drunk. ● We make tezgüino from corn. ● Tezguino; corn-based alcoholic beverage. (From Lin, 1998a ) 8

  9. Distributional Similarity ● How can we represent the “company” of a word? ● How can we make similar words have similar representations? 9

  10. Vectors: A Refresher ● A vector is a list of numbers ● Each number can be thought of as representing a “dimension” ● a ⃗ = 〈 2,4 〉 y-axis 6 ● b ⃗ = 〈 -4,3 〉 5 4 ● What if we thought of each dimension as 
 3 a “quantity” of a word, rather than an arbitrary 
 2 b x-axis 1 dimension? -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 -2 -3 -4 -5 -6 10

  11. Vectors: A Refresher ● A vector is a list of numbers ● Each number can be thought of as representing a “dimension” ● a ⃗ = 〈 2,4 〉 “up” -ness y-axis 6 ● b ⃗ = 〈 -4,3 〉 5 4 ● What if we thought of each dimension as 
 3 a “quantity” of a word, rather than an arbitrary 
 2 b 1 “long” -ness dimension? -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 -2 -3 -4 -5 -6 11

  12. Vectors: A Refresher ● A vector is a list of numbers ● Each number can be thought of as representing a “dimension” ● a ⃗ = 〈 2,4 〉 “up” -ness y-axis Skyscraper 6 ● b ⃗ = 〈 -4,3 〉 5 4 ● What if we thought of each dimension as 
 Bridge 3 “quantity” of a word, rather than an arbitrary 
 2 1 “long” -ness dimension? -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 Highway -2 -3 -4 -5 -6 12

  13. Vectors: A Refresher xkcd.com/388 ● A vector is a list of numbers ● Each number can be thought of as representing a “dimension” ● a ⃗ = 〈 2,4 〉 ● b ⃗ = 〈 -4,3 〉 ● What if we thought of each dimension as 
 “quantity” of a word, rather than an arbitrary 
 dimension? 13

  14. Vectors: A Refresher xkcd.com/388 ● A vector is a list of numbers ● Each number can be thought of as representing a “dimension” ● a ⃗ = 〈 2,4 〉 ● b ⃗ = 〈 -4,3 〉 ● What if we thought of each dimension as 
 “quantity” of a word, rather than an arbitrary 
 dimension? WTF, Grapefruit? 14

  15. Vector Space: Documents ● We can represent documents as vectors, with each dimension being a count of a particular word Shakespeare Plays x Counts of Words As You Twelfth Julius Henry Like It Night Caesar V battle 1 1 8 15 soldier 2 2 12 36 fool 37 58 1 5 clown 5 117 0 0 15

  16. Vector Space: Documents ● We can represent documents as vectors, with each dimension being a count of a particular word Shakespeare Plays x Counts of Words Julius Henry As You Twelfth Caesar V Like It Night battle 1 1 8 15 soldier 2 2 12 36 fool 37 58 1 5 clown 5 117 0 0 16

  17. Vector Space: Documents ● We can represent documents as vectors, with each dimension being a count of a particular word Dramatic 40 Henry V [5,15] 15 battle 10 Julius Caesar [1,8] Comedic 5 Twelfth Night [58,1] As You Like It [37,1] 5 10 15 20 25 30 35 40 45 50 55 60 fool J&M 3 rd ed, 6.3.1 [link] 17

  18. Vector Space: Words ● Find thematic clusters for words based on words that occur around them. 18

  19. Distributional Similarity ● Represent ‘company’ of word such that similar words will have similar representations ● ‘Company’ = context ● Word represented by context feature vector ● Many alternatives for vector ● Initial representation: ● ‘Bag of words’ feature vector ● Feature vector length N , where N is size of vocabulary ● f i +=1 if word i within window size w of word 19

  20. There are more kinds of plants and animals in the rainforests than anywhere else on Earth. Over half of the millions of known species of plants and animals live in the rainforest. Many are found nowhere else. There are even plants and animals in the rainforest that we have not yet discovered. Biological Example The Paulus company was founded in 1938. Since those days the product range has been the subject of constant expansions and is brought up continuously to correspond with the state of the art. We’re engineering, manufacturing and commissioning world- wide ready-to-run plants packed with our comprehensive know-how. Our Product Range includes pneumatic conveying systems for carbon, carbide, sand, lime and many others. We use reagent injection in molten metal for the… Industrial Example Label the First Use of “Plant” 20

  21. -1 +1 There are more kinds of plants and animals in the rainforests than anywhere else on Earth. Over half of the millions of known species of plants and animals live in the rainforest. Many are found nowhere else. There are even plants and animals in the rainforest that we have not yet discovered. plant: (and: 1, of: 1) 21

  22. -2 +2 There are more kinds of plants and animals in the rainforests than anywhere else on Earth. Over half of the millions of known species of plants and animals live in the rainforest. Many are found nowhere else. There are even plants and animals in the rainforest that we have not yet discovered. plant: (and: 1, animal: 1, kind: 1, of: 1) 22

  23. -3 +3 There are more kinds of plants and animals in the rainforests than anywhere else on Earth. Over half of the millions of known species of plants and animals live in the rainforest. Many are found nowhere else. There are even plants and animals in the rainforest that we have not yet discovered. plant: (and: 1, animal: 1, in: 1, kind: 1, more: 1, of: 1) 23

  24. -4 +4 There are more kinds of plants and animals in the rainforests than anywhere else on Earth. Over half of the millions of known species of plants and animals live in the rainforest. Many are found nowhere else. There are even plants and animals in the rainforest that we have not yet discovered. plant: (and: 1, animal: 1, are: 1, in: 1, kind: 1, more: 1, of: 1, the: 1) 24

  25. -5 +5 There are more kinds of plants and animals in the rainforests than anywhere else on Earth. Over half of the millions of known species of plants and animals live in the rainforest. Many are found nowhere else. There are even plants and animals in the rainforest that we have not yet discovered. plant: (and: 1, animal: 1, are: 1, in: 1, kind: 1, more: 1, of: 1, rainforest: 1, the: 1, there: 1) 25

  26. There are more kinds of plants and animals in the rainforests than anywhere else on Earth. Over half of the millions of known species of plants and animals live in the rainforest. Many are found nowhere else. There are even plants and animals in the rainforest that we have not yet discovered. plant: (and: 1, animal: 2, are: 1, in: 1, kind: 1, more: 1, of: 1, rainforest: 1, the: 1, there: 1, species: 1) 26

  27. There are more kinds of plants and animals in the rainforests than anywhere else on Earth. Over half of the millions of known species of plants and animals live in the rainforest. Many are found nowhere else. There are even plants and animals in the rainforest that we have not yet discovered. plant: (and: 1, animal: 3, are: 2, in: 1, kind: 1, more: 1, of: 1, rainforest: 1, the: 1, there: 1, species: 1) 27

  28. There are more kinds of plants and animals in the rainforests than anywhere else on Earth. Over half of the millions of known species of plants and animals live in the rainforest. Many are found nowhere else. There are even plants and animals in the rainforest that we have not yet discovered. plant: (and: 1, animal: 3, are: 2, in: 1, kind: 1, more: 1, of: 1, rainforest: 2, the: 1, there: 1, species: 1, nowhere: 1) 28

  29. There are more kinds of plants and animals in the rainforests than anywhere else on Earth. Over half of the millions of known species of plants and animals live in the rainforest. Many are found nowhere else. There are even plants and animals in the rainforest that we have not yet discovered. plant: (and: 1, animal: 3, are: 2, in: 1, kind: 1, more: 1, of: 1, rainforest: 2, the: 1, there: 1, species: 1, nowhere: 1) 29

  30. Context Feature Vector aardvark … computer data pinch result sugar apricot 0 … 0 0 1 0 1 pineapple 0 … 0 0 1 0 1 digital 0 … 2 1 0 1 0 information 0 … 1 6 0 4 0 30

  31. Distributional Similarity Questions What is the right neighborhood? How should we weight the features? How can we compute the similarity between vectors? 31

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend