A tool to convert a sentence to a vector. It can be used to partition word2vec data. It can also be used to extract a list of words from a word2vec data file.
usestd::{fs::File,io::{self, BufRead},path::Path,};/// Read lines from a file and return an iterator over the lines.
pub(crate)fnread_lines<P>(filename: P)->io::Result<io::Lines<io::BufReader<File>>>where
P:AsRef<Path>,
{let file =File::open(filename)?;Ok(io::BufReader::new(file).lines())}