pub struct SentimentAssessment {
pub id: String,
pub text_ref: String,
pub dimensions: BTreeMap<SentimentDimension, f64>,
pub performed: bool,
pub manipulation_detected: bool,
pub manipulation_indicators: Vec<String>,
}Expand description
A sentiment assessment of a text.
Fields§
§id: String§text_ref: String§dimensions: BTreeMap<SentimentDimension, f64>§performed: bool§manipulation_detected: bool§manipulation_indicators: Vec<String>Implementations§
Source§impl SentimentAssessment
impl SentimentAssessment
Sourcepub fn set_dimension(&mut self, dimension: SentimentDimension, value: f64)
pub fn set_dimension(&mut self, dimension: SentimentDimension, value: f64)
Sets one sentiment dimension value.
Sourcepub fn assess_sentiment(text: &str) -> f64
pub fn assess_sentiment(text: &str) -> f64
Assess sentiment from text using deterministic lexical matching.
Sourcepub fn detect_performed_sentiment(text: &str) -> bool
pub fn detect_performed_sentiment(text: &str) -> bool
Detect performed (inauthentic) sentiment — excessive positivity or uniform emotional language.
Sourcepub fn detect_sentiment_manipulation(texts: &[String]) -> Vec<String>
pub fn detect_sentiment_manipulation(texts: &[String]) -> Vec<String>
Detect sentiment manipulation — coordinated messaging patterns.
Trait Implementations§
Source§impl Clone for SentimentAssessment
impl Clone for SentimentAssessment
Auto Trait Implementations§
impl Freeze for SentimentAssessment
impl RefUnwindSafe for SentimentAssessment
impl Send for SentimentAssessment
impl Sync for SentimentAssessment
impl Unpin for SentimentAssessment
impl UnsafeUnpin for SentimentAssessment
impl UnwindSafe for SentimentAssessment
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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> 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