#[non_exhaustive]pub struct WindowSentence {
pub start: usize,
pub end: usize,
pub unit: usize,
pub speaker: Option<String>,
pub cls: Vec<String>,
pub cls_scores: Vec<f32>,
pub sentiment: Option<String>,
pub whole: bool,
}Expand description
One sentence of an NlpWindow.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.start: usizeFirst word index, inclusive.
end: usizeLast word index, exclusive.
unit: usizeWhich input unit (paragraph, or turn) this sentence came from.
speaker: Option<String>The speaker of that unit, for a conversation.
cls: Vec<String>Dialogue acts above threshold. Multi-label: a sentence can be both an answer and a question.
cls_scores: Vec<f32>Per-class dialogue-act probabilities, parallel to
NlpLabelMaps::cls.
sentiment: Option<String>Sentiment label, e.g. "positive".
whole: boolWhether the sentence ends within NlpWindow::analysed_words. A
truncated sentence’s analysis is partial.
Trait Implementations§
Source§impl Clone for WindowSentence
impl Clone for WindowSentence
Source§fn clone(&self) -> WindowSentence
fn clone(&self) -> WindowSentence
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 WindowSentence
impl Debug for WindowSentence
Source§impl Default for WindowSentence
impl Default for WindowSentence
Source§fn default() -> WindowSentence
fn default() -> WindowSentence
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WindowSentence
impl RefUnwindSafe for WindowSentence
impl Send for WindowSentence
impl Sync for WindowSentence
impl Unpin for WindowSentence
impl UnsafeUnpin for WindowSentence
impl UnwindSafe for WindowSentence
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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