https://github.com/yuyuzha0/word2vec
a word2vec impl of Chinese language, based on deeplearning4j and ansj
https://github.com/yuyuzha0/word2vec
chinese java nlp word2vec word2vec-zh
Last synced: 9 months ago
JSON representation
a word2vec impl of Chinese language, based on deeplearning4j and ansj
- Host: GitHub
- URL: https://github.com/yuyuzha0/word2vec
- Owner: YuyuZha0
- License: apache-2.0
- Created: 2016-12-19T00:52:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-02-19T02:22:16.000Z (over 5 years ago)
- Last Synced: 2025-10-10T00:45:40.806Z (9 months ago)
- Topics: chinese, java, nlp, word2vec, word2vec-zh
- Language: Java
- Homepage:
- Size: 13.4 MB
- Stars: 28
- Watchers: 4
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# word2vec
a word2vec impl of Chinese language, based on deeplearning4j and ansj
Fit com.github.yuyu.example:
```
Word2Vec word2Vec =
Word2VecCN.builder()
.charset(Charset.forName("GB2312"))
.addFile("/Users/zhaoyuyu/Downloads/阅微草堂笔记.txt")
.addFile("/Users/zhaoyuyu/Downloads/白话加强版阅微草堂笔记.txt")
.build()
.fit();
WordVectorSerializer.writeWord2VecModel(word2Vec, "/Users/zhaoyuyu/Downloads/word2vec");
System.out.println(word2Vec.wordsNearest("鬼", 10));
```
Restore com.github.yuyu.example:
```
public static void main(String[] args) throws FileNotFoundException {
Word2Vec word2Vec = WordVectorSerializer.readWord2VecModel("/Users/zhaoyuyu/Downloads/word2vec");
System.out.println(word2Vec.wordsNearest("鬼", 10));
}
```