Struct nnsplit::NNSplitOptions[][src]

pub struct NNSplitOptions {
    pub threshold: f32,
    pub stride: usize,
    pub max_length: usize,
    pub padding: usize,
    pub length_divisor: usize,
    pub batch_size: usize,
}

Options for splitting text.

Fields

threshold: f32

Threshold from 0 to 1 above which predictions will be considered positive.

stride: usize

How much to move the window after each prediction (comparable to stride of 1d convolution).

max_length: usize

The maximum length of each cut (comparable to kernel size of 1d convolution).

padding: usize

How much to zero pad the text on both sides.

length_divisor: usize

Total length will be padded until it is divisible by this number. Allows some additional optimizations.

batch_size: usize

Batch size to use.

Trait Implementations

impl Default for NNSplitOptions[src]

impl<'de> Deserialize<'de> for NNSplitOptions[src]

impl Serialize for NNSplitOptions[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.