Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DimaKudosh/word2vec
/ functions
Functions
32 in github.com/DimaKudosh/word2vec
⨍
Functions
32
◇
Types & classes
5
↓ 3 callers
Method
get_vector
Get word vector for the given word.
src/wordvectors.rs:60
↓ 2 callers
Method
analogy
(&self, pos: Vec<&str>, neg: Vec<&str>, n: usize)
src/wordvectors.rs:89
↓ 2 callers
Method
cosine
Compute consine distance to similar words. The words in the vector space are characterized through the position and angle to each other. This method
src/wordvectors.rs:73
↓ 2 callers
Function
dot_product
(arr1: &Vec<f32>, arr2: &Vec<f32>)
src/utils.rs:1
↓ 2 callers
Method
next
(&mut self)
src/wordvectors.rs:155
↓ 1 callers
Method
get_index
(&self, word: &str)
src/wordvectors.rs:55
↓ 1 callers
Function
mean
Get the mean (average) of the given Iterator of numbers
src/utils.rs:17
↓ 1 callers
Function
vector_norm
(vector: &mut Vec<f32>)
src/utils.rs:9
↓ 1 callers
Method
vector_size
(&self)
src/vectorreader.rs:22
↓ 1 callers
Method
vocabulary_size
(&self)
src/vectorreader.rs:18
Method
description
(&self)
src/errors.rs:19
Method
fmt
(&self, f: &mut fmt::Formatter)
src/errors.rs:37
Method
from
(err: io::Error)
src/errors.rs:47
Method
get_cluster
(&self, word: &str)
src/wordclusters.rs:41
Method
get_col_count
Return the number of columns of the word vector.
src/wordvectors.rs:128
Method
get_words
Get all known words from the vocabulary.
src/wordvectors.rs:133
Method
get_words_on_cluster
(&self, index: i32)
src/wordclusters.rs:37
Method
load_from_binary
Load a word vector space from file Word2vec is able to store the word vectors in a binary file. This function parses the file and loads the vectors i
src/wordvectors.rs:24
Method
load_from_file
(file_name: &str)
src/wordclusters.rs:14
Method
load_from_reader
Load a word vector space from a reader Word2vec is able to store the word vectors in a binary format. This function parses the bytes in that format a
src/wordvectors.rs:35
Method
load_from_reader
(mut reader: R)
src/wordclusters.rs:21
Function
main
()
examples/example.rs:3
Method
new
(x: &'a Vec<(String, Vec<f32>)>)
src/wordvectors.rs:144
Method
new_from_reader
(mut reader: R)
src/vectorreader.rs:26
Method
next
(&mut self)
src/vectorreader.rs:56
Method
source
(&self)
src/errors.rs:27
Function
test_unexisting_word_cosine
()
tests/tests.rs:19
Function
test_word_analogy
()
tests/tests.rs:30
Function
test_word_analogy_with_empty_params
()
tests/tests.rs:47
Function
test_word_cosine
()
tests/tests.rs:9
Function
test_word_count_is_correctly_returned
()
tests/tests.rs:57
Method
word_count
Get the number of all known words from the vocabulary.
src/wordvectors.rs:123