Struct word2vec::wordvectors::WordVector [] [src]

pub struct WordVector { /* fields omitted */ }

Representation of a word vector space

Each word of a vocabulary is represented by a vector. All words span a vector space. This data structure manages this vector space of words.

Methods

impl WordVector
[src]

[src]

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 into RAM.

[src]

Get word vector for the given word.

[src]

Compute consine distance to similar words.

The words in the vector space are characterized through the position and angle to each other. This method calculates the n closest words via the cosine of the requested word to all other words.

[src]

[src]

Get the number of all known words from the vocabulary.

[src]

Return the number of columns of the word vector.

[src]

Get all known words from the vocabulary.