[][src]Trait finalfusion::vocab::SubwordIndices

pub trait SubwordIndices {
    fn subword_indices(&self, word: &str) -> Option<Vec<usize>>;
}

Get subword indices.

Get the subword indices of a token in the subword vocabulary.

Required methods

fn subword_indices(&self, word: &str) -> Option<Vec<usize>>

Return the subword indices of the subwords of a string, according to the subword vocabulary.

Loading content...

Implementors

impl<I> SubwordIndices for SubwordVocab<I> where
    I: Indexer
[src]

Loading content...