Struct rust_bert::pipelines::token_classification::Token [−][src]
pub struct Token {
pub text: String,
pub score: f64,
pub label: String,
pub label_index: i64,
pub sentence: usize,
pub index: u16,
pub word_index: u16,
pub offset: Option<Offset>,
pub mask: Mask,
}Expand description
Fields
text: StringString representation of the Token
score: f64Confidence score
label: StringToken label (e.g. ORG, LOC in case of NER)
label_index: i64Label index
sentence: usizeSentence index
index: u16Token position index
word_index: u16Token word position index
offset: Option<Offset>Token offsets
mask: MaskToken mask
Trait Implementations
Creates an iterator from a sequence of ConsolidatableTokens.
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Token
impl UnwindSafe for Token
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self
