# Chinese Word Vectors 中文词向量 [For English](https://github.com/Embedding/Chinese-Word-Vectors/blob/master/README.md) 本项目提供超过100种中文词向量,其中包括不同的表示方式(稠密和稀疏)、不同的上下文特征(词、N元组、字等等)、以及不同的训练语料。获取预训练词向量非常方便,下载后即可用于下游任务。 此外,我们还提供了中文词类比任务数据集**CA8**和配套的评测工具,以便对中文词向量进行评估。 ## 参考文献 如果使用了本项目的词向量和CA8数据集请进行如下引用: Shen Li, Zhe Zhao, Renfen Hu, Wensi Li, Tao Liu, Xiaoyong Du, Analogical Reasoning on Chinese Morphological and Semantic Relations, ACL 2018. ``` @InProceedings{P18-2023, author = "Li, Shen and Zhao, Zhe and Hu, Renfen and Li, Wensi and Liu, Tao and Du, Xiaoyong", title = "Analogical Reasoning on Chinese Morphological and Semantic Relations", booktitle = "Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)", year = "2018", publisher = "Association for Computational Linguistics", pages = "138--143", location = "Melbourne, Australia", url = "http://aclweb.org/anthology/P18-2023" } ``` 我们对中文词向量的内部和外部评估任务做了一个非常详尽的分析和对比,参见: Yuanyuan Qiu, Hongzheng Li, Shen Li, Yingdi Jiang, Renfen Hu, Lijiao Yang. Revisiting Correlations between Intrinsic and Extrinsic Evaluations of Word Embeddings. Chinese Computational Linguistics and Natural Language Processing Based on Naturally Annotated Big Data. Springer, Cham, 2018. 209-221. (CCL & NLP-NABD 2018 Best Paper) ``` @incollection{qiu2018revisiting, title={Revisiting Correlations between Intrinsic and Extrinsic Evaluations of Word Embeddings}, author={Qiu, Yuanyuan and Li, Hongzheng and Li, Shen and Jiang, Yingdi and Hu, Renfen and Yang, Lijiao}, booktitle={Chinese Computational Linguistics and Natural Language Processing Based on Naturally Annotated Big Data}, pages={209--221}, year={2018}, publisher={Springer} } ``` ## 格式 所有的预训练词向量文件均为文本格式。每一行都包括一个词和它对应的词向量。所有的值均用空格分开。每个文件的第一行记录了基本信息:第一个数值是文件中总词数,第二个数值是向量维度。 除了稠密的词向量(用SGNS方式训练的),我们也提供了稀疏的词向量(用PPMI方式训练的)。稀疏的词向量格式同liblinear中的一样,以“位置:数值”的方式存储。 ## 预训练中文词向量 ### 基本参数
窗口大小 | 动态窗口 | 子采样 | 低频词阈值 | 迭代次数 | 负采样* |
5 | 是 | 1e-5 | 10 | 5 | 5 |
Word2vec / Skip-Gram with Negative Sampling (SGNS) | ||||
语料 | 上下文特征 | |||
词 | 词 + N元组 | 词 + 字 | 词 + 字 + N元组 | |
Baidu Encyclopedia 百度百科 | 300d | 300d | 300d | 300d / PWD: 5555 |
Wikipedia_zh 中文维基百科 | 300d | 300d | 300d | 300d |
People's Daily News 人民日报 | 300d | 300d | 300d | 300d |
Sogou News 搜狗新闻 | 300d | 300d | 300d | 300d |
Financial News 金融新闻 | 300d | 300d | 300d | 300d |
Zhihu_QA 知乎问答 | 300d | 300d | 300d | 300d |
Weibo 微博 | 300d | 300d | 300d | 300d |
Literature 文学作品 | 300d | 300d / PWD: z5b4 | 300d | 300d / PWD: yenb |
Complete Library in Four Sections 四库全书* |
300d | 300d | NAN | NAN |
Mixed-large 综合 Baidu Netdisk / Google Drive |
300d 300d |
300d 300d |
300d 300d |
300d 300d |
Positive Pointwise Mutual Information (PPMI) | ||||
语料 | 上下文特征 | |||
词 | 词 + N元组 | 词 + 字 | 词 + 字 + N元组 | |
Baidu Encyclopedia 百度百科 | Sparse | Sparse | Sparse | Sparse |
Wikipedia_zh 中文维基百科 | Sparse | Sparse | Sparse | Sparse |
People's Daily News 人民日报 | Sparse | Sparse | Sparse | Sparse |
Sogou News 搜狗新闻 | Sparse | Sparse | Sparse | Sparse |
Financial News 金融新闻 | Sparse | Sparse | Sparse | Sparse |
Zhihu_QA 知乎问答 | Sparse | Sparse | Sparse | Sparse |
Weibo 微博 | Sparse | Sparse | Sparse | Sparse |
Literature 文学作品 | Sparse | Sparse | Sparse | Sparse |
Complete Library in Four Sections 四库全书* |
Sparse | Sparse | NAN | NAN |
Mixed-large 综合 | Sparse | Sparse | Sparse | Sparse |
特征 | 共现信息 | 中心向量 | 上下文向量 |
词 | 词 → 词 | 300d | 300d |
N元组 | 词 → N元组 (1-2) | 300d | 300d |
词 → N元组 (1-3) | 300d | 300d | |
N元组 (1-2) → N元组 (1-2) | 300d | 300d | |
字 | 词 → 字 (1) | 300d | 300d |
词 → 字 (1-2) | 300d | 300d | |
词 → 字 (1-4) | 300d | 300d | |
偏旁部首 | 偏旁部首 | 300d | 300d |
位置 | 词 → 词 (左/右) | 300d | 300d |
词 → 词 (距离) | 300d | 300d | |
全局信息 | 词 → 文章 | 300d | 300d |
语法特征 | 词 → 词性 | 300d | 300d |
词 → 依存关系 | 300d | 300d |
语料 | 大小 | 词数量 | 词汇量 | 详情 |
Baidu Encyclopedia 百度百科 |
4.1G | 745M | 5422K | 中文百科 https://baike.baidu.com/ |
Wikipedia_zh 中文维基百科 |
1.3G | 223M | 2129K | 中文维基百科 https://dumps.wikimedia.org/ |
People's Daily News 人民日报 |
3.9G | 668M | 1664K | 人民日报新闻数据(1946-2017) http://data.people.com.cn/ |
Sogou News 搜狗新闻 |
3.7G | 649M | 1226K | Sogou labs的新闻数据 http://www.sogou.com/labs/ |
Financial News 金融新闻 |
6.2G | 1055M | 2785K | 从多个网站收集到的金融新闻 |
Zhihu_QA 知乎问答 |
2.1G | 384M | 1117K | 中文问答数据 https://www.zhihu.com/ |
Weibo 微博 |
0.73G | 136M | 850K | NLPIR Lab提供的微博数据 http://www.nlpir.org/wordpress/download/weibo.7z |
Literature 文学作品 |
0.93G | 177M | 702K | 8599篇现代文学作品 |
Mixed-large 综合 |
22.6G | 4037M | 10653K | 上述所有数据的汇总 |
Complete Library in Four Sections 四库全书 |
1.5G | 714M | 21.8K | 目前最大的古代文献汇总 |