SlideShare a Scribd company logo
1 of 13
Contextbased TextgenerationusingLSTM networks
Sivasurya Santhanam
Intelligentand Distributed systems
GermanAerospace Center.
sivasurya.santhanam@dlr.de
@ahamsiva
21.11.2018
Content of the presentation
• Sequence models in Natural language processing
• Text generation using Long short-term memory (LSTM) networks
• Drawbacks & Proposed solution
• Context LSTM using Tf-idf & word clustering
• Applications
Sequence models in Natural language processing(NLP)
• Recentdevelopments in NLP
• Bigdata+ GPUs+ ML Algorithms
• Sequentialmodelswithmemoryunitsin
Speech recognitionandLanguagetranslation
• RecurrentNeuralnetworks(RNN) vs LSTM
Image sources: me.me/i/2456240, machine translation(shutterstock), soundwriter(efv-solutions)
I lived in France for the past 7 years, I speak fluent
_________
Text generation using LSTM
The quick brown fox jumps over
quick brown fox jumps over the
brown fox jumps over the lazy
fox jumps over the lazy dog
The king is going to the
king is going to the castle
Input words Target word
Sequence
model
(LSTM)
Text generation using LSTM
'Hobbits lived in the woods happily and the story begins to climb out of the North to be seen in the light of the old man. The Dark Lord were
bent in the dark and the light of the great ship of the Road and the night and the dwarves were drawing off to the ground and the grass and the
main door was gone. The foremost were flung with candles and as the Sun and the horns leapt from the hill and came out of the mist and the
sun was in the sky and the sun was shining and a white figure ran down into a wide shallow sky above them and they were in the air. There
was a great deal of ancient and smooth and the mountains was coming. Now there were no sign of the Enemy. There was a ford in the great
light of the great range of Dale and the Riders of the Eagles and on the borders of the Shire and the great mountains was thrown down and the
road and the River was in the East and the travellers was shut. The men were already in a cloud of gold. There was no longer. He could not
see him to see‘
(Network configuration: Bidirectional LSTM. 256 hidden units. ‘relu’ activation.)
Drawbacks & Proposal
• The language structure of the LSTM model is impressive
• Semantic context of the text is so poor
Proposed Solution
• Context based LSTM models for text generation
• Methods adopted for context extraction
• Tf-idf topics from each sentences
• Topics extracted from clustering word-embedding
Proposed solution
1. Context extraction using
Term frequency – Inverse document frequency (Tf-idf)
Context provided: “Hobbits – gollum – adventure – king – ring – war – friends – war – book – home”
Hobbits lived in the woods and once an elf came all his There was Tom to go on by this If he meant all the game but there was a bit of Moria of
and Bilbo was running a black eyebrows at the Mountain pretty of and and as you played up about and he said up about the hall in all this They
will not come down in it. He had been going up a bit and crept in into the side of a magic beard and into the prisoners of our If you have get him
or I will get my dear sir and Bilbo felt he must have to find this adventures but you are cook the question they all are yes. Dont me on to Bilbo
my sudden understanding a pity mixed with various noticing down and their parlour as well as he could. No trouble He was in a boat and a
breakfast and their sun had been and one of his second wealth as Gandalf dared their ponies behind they had just had a fair breakfast as they
had been gone further he had been adventures many He had and been very He had come a ring of their wild Well all this That
2. Context extraction using word cluster centers
w
• Word embedding of each word
k-means
• Clustering of word vector space using k-means
𝑠
• Summed-up word vectors for the words in a
sentence representing a sentence vector
Cosine
similarity
• Context extracted from the nearest cluster center
to each sentence vector
𝑠 ∈ 𝑚 c ∈ 𝐶
Such that,
Cosine ( 𝑤=0
𝑛
𝑠, c) is minimum
Word vector space
Image source: shanelynn.ie (Example 2-D word vector space) Image source: samyzaf.com (NLP with gensim)
Semantic similarities Semantic relationships
Context extraction using word cluster centers
(a) Word-embedding clusters (n=10) visualized under t-SNE (b) Word-embedding clusters (n=100) visualized under t-SNE
• gandalf - characters hobbits lived in the woods and an elf said that please try down they all that been had only been so they had only been
much in the meantime in the deal of the and and they had brought the dwarves of the dwarves but they had brought him from the road and
the goblins went out and again that they could hear him on their chief and the great Master of the town that of the great wooden spur which
they had had been as the Great Goblin and his little sword that had was in a way but he had picked up in the dark
• ring - Some ago it was so all that so fitted off he found he more one all his second staff on the floor and the laughter of the others of the
door and the laughter of the line of the dwarves and he had never a shocking of the below
• war - end of their way had would be and the most of the dwarves were built with guards
• friends - It was like a pull for the jug
• snake - smash and but the various birds that is the more and horses now he never a cave and was not to be done in the obscurest words
• book - Bilbo I have a little time for the terrible hours and in fact and besides of the town were me that the track had come from a good way
that was too I dont know but I am your last Burglar said a share of the rate
• home - The heart of the hobbit and made of yellow wood
• king - Bilbo was more and a long deal of the dwarves they had been busy in the direction of the Mountain
• hobbit - The dwarves that was in a story of the chief of the dwarves and they were all alone and that they were all alone and whether they
had brought of them the dwarves were not in the valley and they were forced to pull the frightful Eagle the Great Mountain and coming
Context extraction using word cluster centers
Applications
• Question answering systems
• Chat-bots (keeping track of topics)
• Generating text for a defined structure
• Introduction-Literature-method-Conclusion
• Hints development

More Related Content

What's hot

Genetic Algorithm by Example
Genetic Algorithm by ExampleGenetic Algorithm by Example
Genetic Algorithm by ExampleNobal Niraula
 
[1312.5602] Playing Atari with Deep Reinforcement Learning
[1312.5602] Playing Atari with Deep Reinforcement Learning[1312.5602] Playing Atari with Deep Reinforcement Learning
[1312.5602] Playing Atari with Deep Reinforcement LearningSeung Jae Lee
 
A note on word embedding
A note on word embeddingA note on word embedding
A note on word embeddingKhang Pham
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisXin-She Yang
 
Long Short Term Memory (Neural Networks)
Long Short Term Memory (Neural Networks)Long Short Term Memory (Neural Networks)
Long Short Term Memory (Neural Networks)Olusola Amusan
 
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)Sergey Karayev
 
DQN (Deep Q-Network)
DQN (Deep Q-Network)DQN (Deep Q-Network)
DQN (Deep Q-Network)Dong Guo
 
Genetic Algorithm in Artificial Intelligence
Genetic Algorithm in Artificial IntelligenceGenetic Algorithm in Artificial Intelligence
Genetic Algorithm in Artificial IntelligenceSinbad Konick
 
Fuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmFuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmPintu Khan
 
Restricted Boltzmann Machines (RBM)
Restricted Boltzmann Machines (RBM)Restricted Boltzmann Machines (RBM)
Restricted Boltzmann Machines (RBM)Luis Serrano
 
Convolutional neural network
Convolutional neural networkConvolutional neural network
Convolutional neural networkFerdous ahmed
 
Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)Rakuten Group, Inc.
 
Intro to Deep Reinforcement Learning
Intro to Deep Reinforcement LearningIntro to Deep Reinforcement Learning
Intro to Deep Reinforcement LearningKhaled Saleh
 

What's hot (20)

Gradient descent method
Gradient descent methodGradient descent method
Gradient descent method
 
Genetic Algorithm by Example
Genetic Algorithm by ExampleGenetic Algorithm by Example
Genetic Algorithm by Example
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
[1312.5602] Playing Atari with Deep Reinforcement Learning
[1312.5602] Playing Atari with Deep Reinforcement Learning[1312.5602] Playing Atari with Deep Reinforcement Learning
[1312.5602] Playing Atari with Deep Reinforcement Learning
 
Ga ppt (1)
Ga ppt (1)Ga ppt (1)
Ga ppt (1)
 
A note on word embedding
A note on word embeddingA note on word embedding
A note on word embedding
 
Tsp branch and-bound
Tsp branch and-boundTsp branch and-bound
Tsp branch and-bound
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical Analysis
 
Long Short Term Memory (Neural Networks)
Long Short Term Memory (Neural Networks)Long Short Term Memory (Neural Networks)
Long Short Term Memory (Neural Networks)
 
Deep Q-Learning
Deep Q-LearningDeep Q-Learning
Deep Q-Learning
 
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)
Lecture 4: Transformers (Full Stack Deep Learning - Spring 2021)
 
DQN (Deep Q-Network)
DQN (Deep Q-Network)DQN (Deep Q-Network)
DQN (Deep Q-Network)
 
Genetic Algorithm in Artificial Intelligence
Genetic Algorithm in Artificial IntelligenceGenetic Algorithm in Artificial Intelligence
Genetic Algorithm in Artificial Intelligence
 
Fuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmFuzzy Genetic Algorithm
Fuzzy Genetic Algorithm
 
Restricted Boltzmann Machines (RBM)
Restricted Boltzmann Machines (RBM)Restricted Boltzmann Machines (RBM)
Restricted Boltzmann Machines (RBM)
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Convolutional neural network
Convolutional neural networkConvolutional neural network
Convolutional neural network
 
Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)
 
Kalman Filter Presentation
Kalman Filter PresentationKalman Filter Presentation
Kalman Filter Presentation
 
Intro to Deep Reinforcement Learning
Intro to Deep Reinforcement LearningIntro to Deep Reinforcement Learning
Intro to Deep Reinforcement Learning
 

Recently uploaded

Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...shambhavirathore45
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramMoniSankarHazra
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Delhi Call girls
 
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlCall Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlkumarajju5765
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxolyaivanovalion
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightDelhi Call girls
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023ymrp368
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 

Recently uploaded (20)

Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics Program
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlCall Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptx
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 

Context-based text generation LSTM networks

  • 1. Contextbased TextgenerationusingLSTM networks Sivasurya Santhanam Intelligentand Distributed systems GermanAerospace Center. sivasurya.santhanam@dlr.de @ahamsiva 21.11.2018
  • 2. Content of the presentation • Sequence models in Natural language processing • Text generation using Long short-term memory (LSTM) networks • Drawbacks & Proposed solution • Context LSTM using Tf-idf & word clustering • Applications
  • 3. Sequence models in Natural language processing(NLP) • Recentdevelopments in NLP • Bigdata+ GPUs+ ML Algorithms • Sequentialmodelswithmemoryunitsin Speech recognitionandLanguagetranslation • RecurrentNeuralnetworks(RNN) vs LSTM Image sources: me.me/i/2456240, machine translation(shutterstock), soundwriter(efv-solutions) I lived in France for the past 7 years, I speak fluent _________
  • 4. Text generation using LSTM The quick brown fox jumps over quick brown fox jumps over the brown fox jumps over the lazy fox jumps over the lazy dog The king is going to the king is going to the castle Input words Target word Sequence model (LSTM)
  • 5. Text generation using LSTM 'Hobbits lived in the woods happily and the story begins to climb out of the North to be seen in the light of the old man. The Dark Lord were bent in the dark and the light of the great ship of the Road and the night and the dwarves were drawing off to the ground and the grass and the main door was gone. The foremost were flung with candles and as the Sun and the horns leapt from the hill and came out of the mist and the sun was in the sky and the sun was shining and a white figure ran down into a wide shallow sky above them and they were in the air. There was a great deal of ancient and smooth and the mountains was coming. Now there were no sign of the Enemy. There was a ford in the great light of the great range of Dale and the Riders of the Eagles and on the borders of the Shire and the great mountains was thrown down and the road and the River was in the East and the travellers was shut. The men were already in a cloud of gold. There was no longer. He could not see him to see‘ (Network configuration: Bidirectional LSTM. 256 hidden units. ‘relu’ activation.)
  • 6. Drawbacks & Proposal • The language structure of the LSTM model is impressive • Semantic context of the text is so poor Proposed Solution • Context based LSTM models for text generation • Methods adopted for context extraction • Tf-idf topics from each sentences • Topics extracted from clustering word-embedding
  • 8. 1. Context extraction using Term frequency – Inverse document frequency (Tf-idf) Context provided: “Hobbits – gollum – adventure – king – ring – war – friends – war – book – home” Hobbits lived in the woods and once an elf came all his There was Tom to go on by this If he meant all the game but there was a bit of Moria of and Bilbo was running a black eyebrows at the Mountain pretty of and and as you played up about and he said up about the hall in all this They will not come down in it. He had been going up a bit and crept in into the side of a magic beard and into the prisoners of our If you have get him or I will get my dear sir and Bilbo felt he must have to find this adventures but you are cook the question they all are yes. Dont me on to Bilbo my sudden understanding a pity mixed with various noticing down and their parlour as well as he could. No trouble He was in a boat and a breakfast and their sun had been and one of his second wealth as Gandalf dared their ponies behind they had just had a fair breakfast as they had been gone further he had been adventures many He had and been very He had come a ring of their wild Well all this That
  • 9. 2. Context extraction using word cluster centers w • Word embedding of each word k-means • Clustering of word vector space using k-means 𝑠 • Summed-up word vectors for the words in a sentence representing a sentence vector Cosine similarity • Context extracted from the nearest cluster center to each sentence vector 𝑠 ∈ 𝑚 c ∈ 𝐶 Such that, Cosine ( 𝑤=0 𝑛 𝑠, c) is minimum
  • 10. Word vector space Image source: shanelynn.ie (Example 2-D word vector space) Image source: samyzaf.com (NLP with gensim) Semantic similarities Semantic relationships
  • 11. Context extraction using word cluster centers (a) Word-embedding clusters (n=10) visualized under t-SNE (b) Word-embedding clusters (n=100) visualized under t-SNE
  • 12. • gandalf - characters hobbits lived in the woods and an elf said that please try down they all that been had only been so they had only been much in the meantime in the deal of the and and they had brought the dwarves of the dwarves but they had brought him from the road and the goblins went out and again that they could hear him on their chief and the great Master of the town that of the great wooden spur which they had had been as the Great Goblin and his little sword that had was in a way but he had picked up in the dark • ring - Some ago it was so all that so fitted off he found he more one all his second staff on the floor and the laughter of the others of the door and the laughter of the line of the dwarves and he had never a shocking of the below • war - end of their way had would be and the most of the dwarves were built with guards • friends - It was like a pull for the jug • snake - smash and but the various birds that is the more and horses now he never a cave and was not to be done in the obscurest words • book - Bilbo I have a little time for the terrible hours and in fact and besides of the town were me that the track had come from a good way that was too I dont know but I am your last Burglar said a share of the rate • home - The heart of the hobbit and made of yellow wood • king - Bilbo was more and a long deal of the dwarves they had been busy in the direction of the Mountain • hobbit - The dwarves that was in a story of the chief of the dwarves and they were all alone and that they were all alone and whether they had brought of them the dwarves were not in the valley and they were forced to pull the frightful Eagle the Great Mountain and coming Context extraction using word cluster centers
  • 13. Applications • Question answering systems • Chat-bots (keeping track of topics) • Generating text for a defined structure • Introduction-Literature-method-Conclusion • Hints development

Editor's Notes

  1. 0,,,4-5 1,,,5-6 N-l,,,,N – n+1