[][src]Struct sentencepiece::PieceWithId

pub struct PieceWithId {
    pub piece: String,
    pub id: u32,
    pub span: (u32, u32),
}

Sentence piece with its identifier and string span.

Fields

piece: String

The sentence piece as a string.

id: u32

The vocabulary identifier of the sentence piece.

span: (u32, u32)

The span of the sentence piece in the tokenized string.

The span is encoded as the byte offsets [begin, end).

Trait Implementations

impl Clone for PieceWithId[src]

impl Debug for PieceWithId[src]

impl Eq for PieceWithId[src]

impl PartialEq<PieceWithId> for PieceWithId[src]

impl StructuralEq for PieceWithId[src]

impl StructuralPartialEq for PieceWithId[src]

Auto Trait Implementations

impl RefUnwindSafe for PieceWithId

impl Send for PieceWithId

impl Sync for PieceWithId

impl Unpin for PieceWithId

impl UnwindSafe for PieceWithId

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<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.