pub struct Token {
pub text: String,
pub byte_start: usize,
pub byte_end: usize,
pub position: usize,
pub position_length: usize,
pub word_id: WordId,
pub details: Vec<String>,
}Fields§
§text: StringText content of the token.
byte_start: usizeStarting position of the token in bytes.
byte_end: usizeEnding position of the token in bytes.
position: usizePosition, expressed in number of tokens.
position_length: usizeThe length expressed in terms of number of original tokens.
word_id: WordIdThe ID of the word and a flag to indicate whether the word is registered in the dictionary.
details: Vec<String>Detailes about the token. It contains metadata for tokens, such as part-of-speech information.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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