@hackage word2vec-model0.1.0.0
Reading word2vec binary models
Categories
License
BSD-3-Clause
Maintainer
filipg@amu.edu.pl
Links
Versions
- 0.1.0.0 Sat, 30 Dec 2017
Installation
Dependencies (8)
- attoparsec
- base >=4.7 && <5
- binary
- binary-ieee754
- bytestring
- text Show all…
Dependents (0)
word2vec-model
Reading word2vec binary models (generated with the original tool by Mikolov).
This simple module is only for reading word2vec models (it cannot be used to generate a word2vec model, for this the original word2vec tools should be used).
Note that word2vec binary format is not a proper serialisation format (as it is mostly a raw dump of C data. Caveat emptor, it might be risky to read a model generated on a host with a different architecture.
Example:
{-# LANGUAGE OverloadedStrings #-}
model <- readWord2VecModel "binary.bin"
let theMostSimilar = findKNearestToWord w2v 30 "polska"