Vector Representations of Words

此为TensorFlow框架官网学习笔记,原文为Vector Representations of Words

The Skip-gram Model

以下面这个为例

1
the quick brown fox jumped over the lazy dog

如上的语句,我们可以得到context(上下文),target(目标词),(context,target)这里使用的窗口大小为1:

1
([the, brown], quick), ([quick, fox], brown), ([brown, jumped], fox), ...

这个是CBOW的训练数据,转换为skip-gram model,这样训练集就变为如下:

1
(quick, the), (quick, brown), (brown, quick), (brown, fox), ...

如果觉得有帮助,给我打赏吧!