- Natural Language Processing with TensorFlow
- Thushan Ganegedara
- 312字
- 2021-06-25 21:28:22
Chapter 3. Word2vec – Learning Word Embeddings
In this chapter, we will discuss a topic of paramount importance in NLP—Word2vec, a technique to learn word embeddings or distributed numerical feature representations (that is, vectors) of words. Learning word representations lies at the very foundation of many NLP tasks because many NLP tasks rely on good feature representations for words that preserve their semantics as well as their context in a language. For example, the feature representation of the word forest should be very different from oven as these words are rarely used in similar contexts, whereas the representations of forest and jungle should be very similar.
Note
Word2vec is called a distributed representation, as the semantics of the word is captured by the activation pattern of the full representation vector, in contrast to a single element of the representation vector (for example, setting a single element in the vector to 1 and rest to 0 for a single word).
We will go step by step from the classical approach to solving this problem to modern neural network-based methods that deliver state-of-the-art performance in finding good word representations. We visualize (using t-SNE, a visualization technique for high-dimensional data) such learned word embeddings for a set of words on a 2D canvas in Figure 3.1. If you take a closer look, you will see that similar things are placed close to each other (for example, numbers in the cluster in the middle):

Figure 3.1: An example visualization of learned word embeddings using t-SNE
Note
t-Distributed Stochastic Neighbor Embedding (t-SNE)
This is a dimensionality reduction technique that projects high-dimensional data to a two-dimensional space. This allows us to imagine how high-dimensional data is distributed in space, and it is quite useful as we cannot visualize beyond three dimensions easily. You will learn about t-SNE in more detail in the next chapter.
- 高手是如何做產(chǎn)品設(shè)計(jì)的(全2冊(cè))
- 自己動(dòng)手寫(xiě)搜索引擎
- 深入理解Bootstrap
- Hands-On Image Processing with Python
- Rake Task Management Essentials
- Java Web及其框架技術(shù)
- Learning Python Design Patterns(Second Edition)
- Java面向?qū)ο蟪绦蛟O(shè)計(jì)
- PHP 7從零基礎(chǔ)到項(xiàng)目實(shí)戰(zhàn)
- 智能手機(jī)故障檢測(cè)與維修從入門到精通
- Building Dynamics CRM 2015 Dashboards with Power BI
- DB2SQL性能調(diào)優(yōu)秘笈
- jQuery Mobile Web Development Essentials(Second Edition)
- 軟件再工程:優(yōu)化現(xiàn)有軟件系統(tǒng)的方法與最佳實(shí)踐
- Web前端開(kāi)發(fā)實(shí)戰(zhàn)教程(HTML5+CSS3+JavaScript)(微課版)