pub trait NGramIndices {
    // Required method
    fn ngram_indices(
        &self,
        word: &str
    ) -> Option<Vec<(String, SmallVec<[usize; 4]>)>>;
}
Expand description

Get subword indices.

Get the subword ngrams and their indices of a word in the subword vocabulary.

Required Methods§

source

fn ngram_indices( &self, word: &str ) -> Option<Vec<(String, SmallVec<[usize; 4]>)>>

Return the subword ngrams and their indices of a word, in the subword vocabulary.

Implementors§

source§

impl<I> NGramIndices for SubwordVocab<I>where I: Indexer,