0%

文本表示

本篇文章记录了NLP中常见文本表示方法。

包括:

  • one-hot

  • bool vector——0 1 0 1的向量

  • count vector——0 1 2 3 4 这种的向量

  • tf-idf——(0.7, 0.3,。。。,0)这种向量

  • Word2Vec

  • FastText

One-hot

One-hot表示(太简单,不多说)- 字/词表示

Boolean representation

与One-hot对应的 句表示 方法为boolean representation

在这里插入图片描述

one hot 和 boolean representation 方法以及后面的 count-based representation 均为词典大小的维数

Count-based representation

还有一种 句表示 方法使用 count-based representation方法

在这里插入图片描述刚刚的Boolean representation对于重复出现的元素不作考虑,
但是count-based representation方法会考虑一个词的出现次数

Tf-idf representation

在这里插入图片描述

在这里插入图片描述

基于count的表示维数是词典大小,这里tf-idf最终维度其实也是词典大小的维数。

分布式词向量

在这里插入图片描述

[FastText目前全网最全的工业级详解_Xu_Wave的博客-CSDN博客_fasttext详解]

(https://blog.csdn.net/qq_22795223/article/details/105738268)