pub struct LengthTestExample {
pub entity_text: String,
pub sentence: String,
pub entity_type: EntityType,
pub char_length: usize,
pub word_count: usize,
pub char_bucket: LengthBucket,
pub word_bucket: WordCountBucket,
}Expand description
An entity example with length metadata.
Fields§
§entity_text: StringThe entity text
sentence: StringFull sentence containing the entity
entity_type: EntityTypeExpected entity type
char_length: usizeCharacter length of entity
word_count: usizeWord count of entity
char_bucket: LengthBucketCharacter length bucket
word_bucket: WordCountBucketWord count bucket
Implementations§
Source§impl LengthTestExample
impl LengthTestExample
Sourcepub fn new(entity: &str, entity_type: EntityType) -> Self
pub fn new(entity: &str, entity_type: EntityType) -> Self
Create a new length test example.
Sourcepub fn with_sentence(
entity: &str,
sentence: &str,
entity_type: EntityType,
) -> Self
pub fn with_sentence( entity: &str, sentence: &str, entity_type: EntityType, ) -> Self
Create with a custom sentence.
Trait Implementations§
Source§impl Clone for LengthTestExample
impl Clone for LengthTestExample
Source§fn clone(&self) -> LengthTestExample
fn clone(&self) -> LengthTestExample
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LengthTestExample
impl Debug for LengthTestExample
Source§impl<'de> Deserialize<'de> for LengthTestExample
impl<'de> Deserialize<'de> for LengthTestExample
Source§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 Freeze for LengthTestExample
impl RefUnwindSafe for LengthTestExample
impl Send for LengthTestExample
impl Sync for LengthTestExample
impl Unpin for LengthTestExample
impl UnsafeUnpin for LengthTestExample
impl UnwindSafe for LengthTestExample
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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