[−][src]Trait finalfusion::subword::SubwordIndices
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,
&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.
Implementations on Foreign Types
impl SubwordIndices for str
[src]
fn subword_indices<I>(
&self,
min_n: usize,
max_n: usize,
indexer: &I
) -> Vec<u64> where
I: Indexer,
[src]
&self,
min_n: usize,
max_n: usize,
indexer: &I
) -> Vec<u64> where
I: Indexer,