pub struct ExtractionSchema {
pub relations: Vec<LabelSpec>,
pub entity_types: Option<Vec<LabelSpec>>,
pub top_per_pair: Option<usize>,
}Expand description
The relations and entity types to extract from one request.
Schema label embeddings are computed once and cached per exact label list, so a stable schema costs nothing after the first request.
Fields§
§relations: Vec<LabelSpec>Relations to score for every ordered entity pair. Empty means no facts are extracted.
entity_types: Option<Vec<LabelSpec>>Entity types to extract. None falls back to the model’s coarse
types (kniv v7: LOC, MISC, NUM, ORG, PER, TIME).
top_per_pair: Option<usize>How many relations to keep per entity pair. None uses the model’s
calibrated rel_top (kniv v7: 4).
Trait Implementations§
Source§impl Clone for ExtractionSchema
impl Clone for ExtractionSchema
Source§fn clone(&self) -> ExtractionSchema
fn clone(&self) -> ExtractionSchema
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ExtractionSchema
impl Debug for ExtractionSchema
Source§impl Default for ExtractionSchema
impl Default for ExtractionSchema
Source§fn default() -> ExtractionSchema
fn default() -> ExtractionSchema
Returns the “default value” for a type. Read more
impl Eq for ExtractionSchema
Source§impl PartialEq for ExtractionSchema
impl PartialEq for ExtractionSchema
impl StructuralPartialEq for ExtractionSchema
Auto Trait Implementations§
impl Freeze for ExtractionSchema
impl RefUnwindSafe for ExtractionSchema
impl Send for ExtractionSchema
impl Sync for ExtractionSchema
impl Unpin for ExtractionSchema
impl UnsafeUnpin for ExtractionSchema
impl UnwindSafe for ExtractionSchema
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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