[][src]Trait finalfusion::subword::BucketIndexer

pub trait BucketIndexer: Indexer {
    fn new(buckets: usize) -> Self;
fn buckets(&self) -> usize; }

N-Gram indexer with bucketing.

Required methods

fn new(buckets: usize) -> Self

Create a new indexer.

The buckets argument is the number of buckets or the bucket exponent (depending on the implementation).

fn buckets(&self) -> usize

Get the number of buckets.

Depending on the indexer, this may be the actual number of buckets or the bucket exponent.

Loading content...

Implementors

impl BucketIndexer for FastTextIndexer[src]

fn new(buckets: usize) -> Self[src]

Construct a FastTextIndexer instance

buckets is the (exact) number of buckets to use.

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

fn new(buckets_exp: usize) -> Self[src]

Construct a HashIndexer.

The largest possible bucket exponent is 64.

Loading content...