pub struct TokenIdsWithOffsets {
pub ids: Vec<i64>,
pub offsets: Vec<Option<Offset>>,
pub reference_offsets: Vec<Vec<OffsetSize>>,
pub masks: Vec<Mask>,
}Expand description
§Encoded sequence
Intermediate tokenization steps before addition of special tokens, after encoding
Fields§
§ids: Vec<i64>Vector of token IDs
offsets: Vec<Option<Offset>>Offset information (as start and end positions) in relation to the original text. Tokens that can not be related to the original source are registered as None.
reference_offsets: Vec<Vec<OffsetSize>>Offset information (as a sequence of positions) in relation to the original text. Tokens that can not be related to the original source are registered as None.
masks: Vec<Mask>Masks tokens providing information on the type of tokens. This vector has the same length as token_ids.
Trait Implementations§
Source§impl Clone for TokenIdsWithOffsets
impl Clone for TokenIdsWithOffsets
Source§fn clone(&self) -> TokenIdsWithOffsets
fn clone(&self) -> TokenIdsWithOffsets
Returns a duplicate 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 TokenIdsWithOffsets
impl Debug for TokenIdsWithOffsets
Source§impl PartialEq for TokenIdsWithOffsets
impl PartialEq for TokenIdsWithOffsets
impl Eq for TokenIdsWithOffsets
impl StructuralPartialEq for TokenIdsWithOffsets
Auto Trait Implementations§
impl Freeze for TokenIdsWithOffsets
impl RefUnwindSafe for TokenIdsWithOffsets
impl Send for TokenIdsWithOffsets
impl Sync for TokenIdsWithOffsets
impl Unpin for TokenIdsWithOffsets
impl UnwindSafe for TokenIdsWithOffsets
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more