项目作者: spacelis

项目描述 :
A fun project for learning Rust
高级语言: Rust
项目地址: git://github.com/spacelis/vec2bin.git
创建时间: 2018-06-20T09:54:17Z
项目社区:https://github.com/spacelis/vec2bin

开源协议:

下载


VEC2BIN

This is a toy project for learning Rust programming language.
It converts a text file of word vectors into a binary format.
That is,

  1. m n
  2. w_1<tab>f_11<tab>f_12...f_1n
  3. w_2<tab>f_21<tab>f_22...f_2n
  4. ...
  5. w_m<tab>f_m1<tab>f_m2...f_mn

to a text file contain the list of words and a HDF5 file contain the matrix in binary format.
This is compatible with fastText format.

The release build can process 2.5 million words in 100 seconds.

NOTE

When learning the owner/borrow checker/lifetime, I got the feeling that Rust coders need to be more specific about what scope owns the variable (who will release the variable eventually).
The language seems designed around the concept of ownerships.