pub struct Context { /* private fields */ }Expand description
Document-wide evidence about names, shared across extraction calls.
use narrative_graph::heuristic::{extract_aggregates_in, Context};
use narrative_graph::Options;
let mut context = Context::default().with_narrator("wren");
context.learn("Mrs. Chen waved. Then she fed the cat.");
let found = extract_aggregates_in("I met my mother, Nora.", &Options::default(), &context)
.unwrap();
assert!(found.iter().any(|a| a.relation == "mother_of"));Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for Context
impl Freeze for Context
impl Move for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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