Word2Vec4Node
Google Word2Vec Interface for Node.js with N-API
Notice
Only Unix-like OS can use Word2Vec.train()
method. pthread only working on POSIX, Windows can not use the method.
ChangeLog
See CHANGELOG
Installation
- Install with npm:
npm install word2vec4node --save
- Clone the repo:
git clone https://github.com/Astro36/word2vec4node.git
Usage
Example
Find the top-N most similar words:
const Word2Vec = ;const model = Word2Vec;// [서울] - [한국] + [일본]console;
Which word from the words doesn’t match with the others:
const Word2Vec = ;const model = Word2Vec;console;
Compute cosine distances from the words:
const Word2Vec = ;const model = Word2Vec;console;
License
Word2Vec4NodeCopyright (C) 2018 Astro This program is free software: you can redistribute it and/or modifyit under the terms of the GNU Lesser General Public License as published bythe Free Software Foundation, either version 3 of the License, or(at your option) any later version. This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.