pub struct CrossKBMapper { /* private fields */ }Expand description
Cross-KB entity mappings.
Maps entities between different knowledge bases using owl:sameAs relationships.
Implementations§
Source§impl CrossKBMapper
impl CrossKBMapper
Sourcepub fn new() -> CrossKBMapper
pub fn new() -> CrossKBMapper
Create a new mapper.
Sourcepub fn add_mapping(&mut self, wikidata_qid: &str, other_uri: EntityURI)
pub fn add_mapping(&mut self, wikidata_qid: &str, other_uri: EntityURI)
Add a mapping from Wikidata to another KB.
Sourcepub fn get_uris(&self, wikidata_qid: &str) -> Vec<&EntityURI>
pub fn get_uris(&self, wikidata_qid: &str) -> Vec<&EntityURI>
Get all URIs for a Wikidata entity.
Sourcepub fn to_wikidata(&self, uri: &str) -> Option<&str>
pub fn to_wikidata(&self, uri: &str) -> Option<&str>
Find Wikidata QID from any other KB URI.
Sourcepub fn with_common_mappings() -> CrossKBMapper
pub fn with_common_mappings() -> CrossKBMapper
Create mapper with well-known entity mappings.
Trait Implementations§
Source§impl Clone for CrossKBMapper
impl Clone for CrossKBMapper
Source§fn clone(&self) -> CrossKBMapper
fn clone(&self) -> CrossKBMapper
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 CrossKBMapper
impl Debug for CrossKBMapper
Source§impl Default for CrossKBMapper
impl Default for CrossKBMapper
Source§fn default() -> CrossKBMapper
fn default() -> CrossKBMapper
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CrossKBMapper
impl RefUnwindSafe for CrossKBMapper
impl Send for CrossKBMapper
impl Sync for CrossKBMapper
impl Unpin for CrossKBMapper
impl UnsafeUnpin for CrossKBMapper
impl UnwindSafe for CrossKBMapper
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