#[non_exhaustive]pub enum EntityCategory {
Agent,
Organization,
Place,
Creative,
Temporal,
Numeric,
Contact,
Relation,
Misc,
}Expand description
Category of entity based on detection characteristics and semantics.
Based on OntoNotes 5.0 categories with extensions for:
- Structured data (Contact, patterns)
- Knowledge graphs (Relation, for TPLinker/GLiNER joint extraction)
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Agent
Named entities for people/groups (ML-required). Types: Person, NORP (nationalities/religious/political groups)
Organization
Named entities for organizations/facilities (ML-required). Types: Organization, Facility
Place
Named entities for places (ML-required). Types: GPE (geo-political), Location (geographic)
Creative
Named entities for creative/conceptual (ML-required). Types: Event, Product, WorkOfArt, Law, Language
Temporal
Temporal entities (pattern-detectable). Types: Date, Time
Numeric
Numeric entities (pattern-detectable). Types: Money, Percent, Quantity, Cardinal, Ordinal
Contact
Contact/identifier entities (pattern-detectable). Types: Email, Url, Phone
Relation
Relation triggers for knowledge graph construction (ML-required). Examples: “CEO of”, “located in”, “founded by” In GLiNER bi-encoder, relations are just another label to match.
Misc
Miscellaneous/unknown category
Implementations§
Source§impl EntityCategory
impl EntityCategory
Sourcepub const fn requires_ml(&self) -> bool
pub const fn requires_ml(&self) -> bool
Returns true if this category requires ML for detection.
Sourcepub const fn pattern_detectable(&self) -> bool
pub const fn pattern_detectable(&self) -> bool
Returns true if this category can be detected via patterns.
Sourcepub const fn is_relation(&self) -> bool
pub const fn is_relation(&self) -> bool
Returns true if this is a relation (for knowledge graph construction).
Trait Implementations§
Source§impl Clone for EntityCategory
impl Clone for EntityCategory
Source§fn clone(&self) -> EntityCategory
fn clone(&self) -> EntityCategory
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EntityCategory
impl Debug for EntityCategory
Source§impl<'de> Deserialize<'de> for EntityCategory
impl<'de> Deserialize<'de> for EntityCategory
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EntityCategory, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EntityCategory, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for EntityCategory
impl Display for EntityCategory
Source§impl Hash for EntityCategory
impl Hash for EntityCategory
Source§impl PartialEq for EntityCategory
impl PartialEq for EntityCategory
Source§impl Serialize for EntityCategory
impl Serialize for EntityCategory
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for EntityCategory
impl Eq for EntityCategory
impl StructuralPartialEq for EntityCategory
Auto Trait Implementations§
impl Freeze for EntityCategory
impl RefUnwindSafe for EntityCategory
impl Send for EntityCategory
impl Sync for EntityCategory
impl Unpin for EntityCategory
impl UnsafeUnpin for EntityCategory
impl UnwindSafe for EntityCategory
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.