pub struct StreamingExtractor<'m, M: Model> { /* private fields */ }Expand description
A streaming entity extractor that processes text in chunks.
Implementations§
Source§impl<'m, M: Model> StreamingExtractor<'m, M>
impl<'m, M: Model> StreamingExtractor<'m, M>
Sourcepub fn new(model: &'m M, config: ChunkConfig) -> Self
pub fn new(model: &'m M, config: ChunkConfig) -> Self
Create a new streaming extractor with the given model and config.
Sourcepub fn with_model(model: &'m M) -> Self
pub fn with_model(model: &'m M) -> Self
Create with default config.
Sourcepub fn extract<'t>(&'m self, text: &'t str) -> EntityIterator<'m, 't, M> ⓘ
pub fn extract<'t>(&'m self, text: &'t str) -> EntityIterator<'m, 't, M> ⓘ
Extract entities from text, yielding them as an iterator.
Trait Implementations§
Auto Trait Implementations§
impl<'m, M> Freeze for StreamingExtractor<'m, M>
impl<'m, M> RefUnwindSafe for StreamingExtractor<'m, M>where
M: RefUnwindSafe,
impl<'m, M> Send for StreamingExtractor<'m, M>
impl<'m, M> Sync for StreamingExtractor<'m, M>
impl<'m, M> Unpin for StreamingExtractor<'m, M>
impl<'m, M> UnsafeUnpin for StreamingExtractor<'m, M>
impl<'m, M> UnwindSafe for StreamingExtractor<'m, M>where
M: RefUnwindSafe,
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> 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