[][src]Trait finalfusion::subword::SubwordIndices

pub trait SubwordIndices {
    fn subword_indices<I>(
        &self,
        min_n: usize,
        max_n: usize,
        indexer: &I
    ) -> Vec<u64>
    where
        I: Indexer
; }

Extension trait for computing subword indices.

Subword indexing assigns an identifier to each subword (n-gram) of a string. A subword is indexed by computing its hash and then mapping the hash to a bucket.

Since a non-perfect hash function is used, multiple subwords can map to the same index.

Required methods

fn subword_indices<I>(
    &self,
    min_n: usize,
    max_n: usize,
    indexer: &I
) -> Vec<u64> where
    I: Indexer

Return the subword indices of the subwords of a string.

The n-grams that are used are of length [min_n, max_n], these are mapped to indices using the given indexer.

The largest possible bucket exponent is 64.

Loading content...

Implementations on Foreign Types

impl SubwordIndices for str[src]

Loading content...

Implementors

Loading content...