[−][src]Trait finalfusion::subword::Indexer
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.
Implementors
impl Indexer for FastTextIndexer
[src]
fn index_ngram(&self, ngram: &StrWithCharLen) -> Option<u64>
[src]
fn upper_bound(&self) -> u64
[src]
impl Indexer for ExplicitIndexer
[src]
fn index_ngram(&self, ngram: &StrWithCharLen) -> Option<u64>
[src]
fn upper_bound(&self) -> u64
[src]
impl<H> Indexer for HashIndexer<H> where
H: Default + Hasher,
[src]
H: Default + Hasher,