pub struct EntityFeatureExtractor { /* private fields */ }Expand description
Entity feature extractor.
Extracts comprehensive features from entities at multiple levels:
- Mention context (surrounding text, position)
- Chain aggregates (for coreference chains)
- Co-occurrence patterns (which entities appear together)
Implementations§
Source§impl EntityFeatureExtractor
impl EntityFeatureExtractor
Sourcepub fn new(config: ExtractorConfig) -> Self
pub fn new(config: ExtractorConfig) -> Self
Create a new extractor with the given configuration.
Sourcepub fn extract_all(&self, text: &str, entities: &[Entity]) -> DocumentFeatures
pub fn extract_all(&self, text: &str, entities: &[Entity]) -> DocumentFeatures
Extract all features from text and entities.
Sourcepub fn extract_mentions(
&self,
text: &str,
entities: &[Entity],
) -> Vec<MentionContext>
pub fn extract_mentions( &self, text: &str, entities: &[Entity], ) -> Vec<MentionContext>
Extract only mention contexts (lightweight).
Sourcepub fn extract_chains(
&self,
text: &str,
entities: &[Entity],
) -> HashMap<String, ChainFeatures>
pub fn extract_chains( &self, text: &str, entities: &[Entity], ) -> HashMap<String, ChainFeatures>
Extract only chain features (requires grouping).
Sourcepub fn extract_cooccurrence(
&self,
entities: &[Entity],
) -> HashMap<String, CooccurrenceFeatures>
pub fn extract_cooccurrence( &self, entities: &[Entity], ) -> HashMap<String, CooccurrenceFeatures>
Extract only co-occurrence features.
Trait Implementations§
Source§impl Clone for EntityFeatureExtractor
impl Clone for EntityFeatureExtractor
Source§fn clone(&self) -> EntityFeatureExtractor
fn clone(&self) -> EntityFeatureExtractor
Returns a duplicate of the value. Read more
1.0.0 · 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 EntityFeatureExtractor
impl Debug for EntityFeatureExtractor
Auto Trait Implementations§
impl Freeze for EntityFeatureExtractor
impl RefUnwindSafe for EntityFeatureExtractor
impl Send for EntityFeatureExtractor
impl Sync for EntityFeatureExtractor
impl Unpin for EntityFeatureExtractor
impl UnsafeUnpin for EntityFeatureExtractor
impl UnwindSafe for EntityFeatureExtractor
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,
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