Struct finalfusion::compat::floret::FloretIndexer
source · pub struct FloretIndexer { /* private fields */ }
Expand description
floret subword indexer.
By default, floret does not use a separate word embedding matrix. Every n-gram and the full word is mapped to 1 to 4 hash functions.
Implementations§
Trait Implementations§
source§impl Clone for FloretIndexer
impl Clone for FloretIndexer
source§fn clone(&self) -> FloretIndexer
fn clone(&self) -> FloretIndexer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FloretIndexer
impl Debug for FloretIndexer
source§impl Indexer for FloretIndexer
impl Indexer for FloretIndexer
source§fn index_ngram(&self, ngram: &StrWithCharLen<'_>) -> NGramVec
fn index_ngram(&self, ngram: &StrWithCharLen<'_>) -> NGramVec
Map an n-gram to indices in the subword embedding matrix.
source§fn upper_bound(&self) -> u64
fn upper_bound(&self) -> u64
Return the (exclusive) upper bound of this indexer.
source§fn infallible() -> bool
fn infallible() -> bool
Indicates whether this Indexer never fails to produce an index.
source§fn scope() -> IndicesScope
fn scope() -> IndicesScope
The scope of the indexer.
source§impl PartialEq for FloretIndexer
impl PartialEq for FloretIndexer
source§fn eq(&self, other: &FloretIndexer) -> bool
fn eq(&self, other: &FloretIndexer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for FloretIndexer
impl Eq for FloretIndexer
impl StructuralEq for FloretIndexer
impl StructuralPartialEq for FloretIndexer
Auto Trait Implementations§
impl RefUnwindSafe for FloretIndexer
impl Send for FloretIndexer
impl Sync for FloretIndexer
impl Unpin for FloretIndexer
impl UnwindSafe for FloretIndexer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.