pub struct EventTriggerLexicon { /* private fields */ }Expand description
Event trigger lexicon based on ACE 2005 event types.
Event types follow the ACE hierarchy:
- Life: be-born, marry, divorce, injure, die
- Movement: transport
- Transaction: transfer-ownership, transfer-money
- Business: start-org, merge-org, declare-bankruptcy, end-org
- Conflict: attack, demonstrate
- Contact: meet, phone-write
- Personnel: start-position, end-position, nominate, elect
- Justice: arrest-jail, release-parole, trial-hearing, charge-indict, sue, convict, sentence, fine, execute, extradite, acquit, pardon, appeal
Implementations§
Source§impl EventTriggerLexicon
impl EventTriggerLexicon
Sourcepub fn new() -> EventTriggerLexicon
pub fn new() -> EventTriggerLexicon
Create a new lexicon with default triggers.
Sourcepub fn lookup(&self, word: &str) -> Option<(&str, Option<EventPolarity>)>
pub fn lookup(&self, word: &str) -> Option<(&str, Option<EventPolarity>)>
Look up a trigger in the lexicon.
Sourcepub fn is_negation(&self, word: &str) -> bool
pub fn is_negation(&self, word: &str) -> bool
Check if a word is a negation.
Trait Implementations§
Source§impl Clone for EventTriggerLexicon
impl Clone for EventTriggerLexicon
Source§fn clone(&self) -> EventTriggerLexicon
fn clone(&self) -> EventTriggerLexicon
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 EventTriggerLexicon
impl Debug for EventTriggerLexicon
Source§impl Default for EventTriggerLexicon
impl Default for EventTriggerLexicon
Source§fn default() -> EventTriggerLexicon
fn default() -> EventTriggerLexicon
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventTriggerLexicon
impl RefUnwindSafe for EventTriggerLexicon
impl Send for EventTriggerLexicon
impl Sync for EventTriggerLexicon
impl Unpin for EventTriggerLexicon
impl UnsafeUnpin for EventTriggerLexicon
impl UnwindSafe for EventTriggerLexicon
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> 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