[][src]Trait finalfusion::subword::Indexer

pub trait Indexer {
    fn index_ngram(&self, ngram: &StrWithCharLen) -> Option<u64>;
fn upper_bound(&self) -> u64; }

N-Gram indexer

An indexer maps an n-gram to an index in the subword embedding matrix.

Required methods

fn index_ngram(&self, ngram: &StrWithCharLen) -> Option<u64>

Map an n-gram to an index in the subword embedding matrix.

fn upper_bound(&self) -> u64

Return the (exclusive) upper bound of this indexer.

Loading content...

Implementors

impl Indexer for FastTextIndexer[src]

impl Indexer for ExplicitIndexer[src]

impl<H> Indexer for HashIndexer<H> where
    H: Default + Hasher
[src]

Loading content...