[][src]Struct finalfusion::subword::NGramsIndicesIter

pub struct NGramsIndicesIter<'a, 'b, I> { /* fields omitted */ }

Iterator over the n-grams in a word and the corresponding subword indices.

NGramsIndicesIter is an iterator that produces the n-grams in a word and the corresponding subword indices as tuples (ngram, index).

Warning: no guarantee is provided with regard to the iteration order. The iterator only guarantees that all n-grams and their indices are produced.

Methods

impl<'a, 'b, I> NGramsIndicesIter<'a, 'b, I>[src]

pub fn new(string: &'a str, min_n: usize, max_n: usize, indexer: &'b I) -> Self[src]

Create a new ngrams-indices iterator.

The iterator will create all ngrams of length [min_n, max_n] and corresponding subword indices.

Trait Implementations

impl<'a, 'b, I> Iterator for NGramsIndicesIter<'a, 'b, I> where
    I: Indexer
[src]

type Item = (&'a str, Option<u64>)

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a, 'b, I> RefUnwindSafe for NGramsIndicesIter<'a, 'b, I> where
    I: RefUnwindSafe

impl<'a, 'b, I> Send for NGramsIndicesIter<'a, 'b, I> where
    I: Sync

impl<'a, 'b, I> Sync for NGramsIndicesIter<'a, 'b, I> where
    I: Sync

impl<'a, 'b, I> Unpin for NGramsIndicesIter<'a, 'b, I>

impl<'a, 'b, I> UnwindSafe for NGramsIndicesIter<'a, 'b, I> where
    I: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<T> Itertools for T where
    T: Iterator + ?Sized
[src]

impl<T> ParallelBridge for T where
    T: Send + Iterator,
    <T as Iterator>::Item: Send
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,