This repository contains the implementation for two Chinese word embedding learning methods using semantic and phonetic components, i.e., rPCWE and rsp2vec.
- Linux
- gcc
- cmake
- gensim==4.0.0
The processed Chinese wikipedia dataset can be downloaded here.
Please unzip the downloaded data under the folder data/.
To train the rPCWE model, run the following commands under the rPCWE/src/ folder.
$ chmod 777 -R .
$ bash run.shTo train the rsp2vec model, run the following commands under the rsp2vec/ folder.
$ chmod 777 -R .
$ bash run.shEvaluate the performance of the trained embeddings on the relevance and analogy tasks by running the following commands:
$ python eval.py rPCWE/src/word_vec-3-win7-size150-it75.txt
$ python eval.py rsp2vec/rsp-150.vec