Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tutorial

This repository contains the implementation for two Chinese word embedding learning methods using semantic and phonetic components, i.e., rPCWE and rsp2vec.

0. Environment

  • Linux
  • gcc
  • cmake
  • gensim==4.0.0

1. Download the dataset

The processed Chinese wikipedia dataset can be downloaded here.

Please unzip the downloaded data under the folder data/.

2. Train

rPCWE

To train the rPCWE model, run the following commands under the rPCWE/src/ folder.

$ chmod 777 -R .
$ bash run.sh

rsp2vec

To train the rsp2vec model, run the following commands under the rsp2vec/ folder.

$ chmod 777 -R .
$ bash run.sh

3. Evaluate

Evaluate 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

About

Source code of rsp2vec and rPCWE proposed in Learning Chinese Word Embeddings from Semanticand Phonetic Components

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages