pub struct ExtractedEntity {
pub name: String,
pub entity_type: EntityType,
pub content: String,
pub confidence: f64,
}Expand description
Entity extracted from text by LLM.
TigerStyle: Immutable after creation, validated on construction.
Fields§
§name: StringEntity name/identifier
entity_type: EntityTypeType of entity
content: StringBrief description or context
confidence: f64Extraction confidence (0.0-1.0)
Implementations§
Source§impl ExtractedEntity
impl ExtractedEntity
Sourcepub fn new(
name: impl Into<String>,
entity_type: EntityType,
content: impl Into<String>,
confidence: f64,
) -> Self
pub fn new( name: impl Into<String>, entity_type: EntityType, content: impl Into<String>, confidence: f64, ) -> Self
Create a new extracted entity with validation.
§Panics
Panics if name is empty or confidence is out of range.
Sourcepub fn with_default_confidence(
name: impl Into<String>,
entity_type: EntityType,
content: impl Into<String>,
) -> Self
pub fn with_default_confidence( name: impl Into<String>, entity_type: EntityType, content: impl Into<String>, ) -> Self
Create a new entity with default confidence.
Sourcepub fn is_high_confidence(&self) -> bool
pub fn is_high_confidence(&self) -> bool
Check if this is a high confidence extraction (>= 0.8).
Sourcepub fn is_fallback(&self) -> bool
pub fn is_fallback(&self) -> bool
Check if this is a fallback note entity.
Trait Implementations§
Source§impl Clone for ExtractedEntity
impl Clone for ExtractedEntity
Source§fn clone(&self) -> ExtractedEntity
fn clone(&self) -> ExtractedEntity
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 ExtractedEntity
impl Debug for ExtractedEntity
Source§impl<'de> Deserialize<'de> for ExtractedEntity
impl<'de> Deserialize<'de> for ExtractedEntity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ExtractedEntity
impl PartialEq for ExtractedEntity
Source§impl Serialize for ExtractedEntity
impl Serialize for ExtractedEntity
impl StructuralPartialEq for ExtractedEntity
Auto Trait Implementations§
impl Freeze for ExtractedEntity
impl RefUnwindSafe for ExtractedEntity
impl Send for ExtractedEntity
impl Sync for ExtractedEntity
impl Unpin for ExtractedEntity
impl UnwindSafe for ExtractedEntity
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