pub enum CanonicalType {
Show 27 variants
Person,
Group,
Organization,
GeopoliticalEntity,
NaturalLocation,
Facility,
Location,
Date,
Time,
Money,
Percent,
Quantity,
Cardinal,
Ordinal,
CreativeWork,
Product,
Event,
Law,
Language,
Disease,
Chemical,
Gene,
Drug,
Animal,
Plant,
Food,
Misc,
}Expand description
Canonical entity type in the unified schema.
This is the single source of truth. All dataset-specific labels map here.
Variants§
Person
Individual person (maps from: PER, PERSON, ACTOR, DIRECTOR, etc.)
Group
Group of people by nationality/religion/politics (maps from: NORP) NOT the same as Organization!
Organization
Formal organization (maps from: ORG, ORGANIZATION, CORPORATION)
GeopoliticalEntity
Geopolitical entity - has government (maps from: GPE, COUNTRY, CITY)
NaturalLocation
Natural location (maps from: LOC, LOCATION - mountains, rivers)
Facility
Man-made facility (maps from: FAC, FACILITY - buildings, airports)
Location
Generic location (fallback when distinction unknown)
Date
Date expression
Time
Time expression
Money
Monetary value
Percent
Percentage
Quantity
Quantity with unit
Cardinal
Cardinal number
Ordinal
Ordinal number
CreativeWork
Creative work (maps from: WORK_OF_ART, TITLE, creative-work)
Product
Product (maps from: PRODUCT, PROD)
Event
Event (maps from: EVENT, EVE)
Law
Law or legal document
Language
Language
Disease
Disease or medical condition
Chemical
Chemical compound
Gene
Gene
Drug
Drug
Animal
Animal
Plant
Plant
Food
Food item
Misc
Miscellaneous (maps from: MISC, unknown types)
Implementations§
Source§impl CanonicalType
impl CanonicalType
Sourcepub fn category(&self) -> EntityCategory
pub fn category(&self) -> EntityCategory
Get the category for this canonical type.
Sourcepub fn to_entity_type(&self) -> EntityType
pub fn to_entity_type(&self) -> EntityType
Convert to the legacy EntityType for compatibility.
Trait Implementations§
Source§impl Clone for CanonicalType
impl Clone for CanonicalType
Source§fn clone(&self) -> CanonicalType
fn clone(&self) -> CanonicalType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CanonicalType
impl Debug for CanonicalType
Source§impl Hash for CanonicalType
impl Hash for CanonicalType
Source§impl PartialEq for CanonicalType
impl PartialEq for CanonicalType
impl Copy for CanonicalType
impl Eq for CanonicalType
impl StructuralPartialEq for CanonicalType
Auto Trait Implementations§
impl Freeze for CanonicalType
impl RefUnwindSafe for CanonicalType
impl Send for CanonicalType
impl Sync for CanonicalType
impl Unpin for CanonicalType
impl UnsafeUnpin for CanonicalType
impl UnwindSafe for CanonicalType
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 more