Trait ReadText

Source
pub trait ReadText<R>
where Self: Sized, R: BufRead,
{ // Required method fn read_text(reader: &mut R, normalize: bool) -> Result<Self, Error>; }
Expand description

Method to construct Embeddings from a text file.

This trait defines an extension to Embeddings to read the word embeddings from a text stream. The text should contain one word embedding per line in the following format:

word0 component_1 component_2 … component_n

Required Methods§

Source

fn read_text(reader: &mut R, normalize: bool) -> Result<Self, Error>

Read the embeddings from the given buffered reader.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§