pub struct ConceptMapper { /* private fields */ }
Expand description
Maps text and code to high-level concepts
Implementations§
Source§impl ConceptMapper
impl ConceptMapper
Sourcepub fn map_text_to_concepts(&self, text: &str) -> Vec<String>
pub fn map_text_to_concepts(&self, text: &str) -> Vec<String>
Map text to relevant concepts
Sourcepub fn get_concept(&self, name: &str) -> Option<&CodeConcept>
pub fn get_concept(&self, name: &str) -> Option<&CodeConcept>
Get concept by name
Sourcepub fn get_concepts_by_category(
&self,
category: &ConceptCategory,
) -> Vec<&CodeConcept>
pub fn get_concepts_by_category( &self, category: &ConceptCategory, ) -> Vec<&CodeConcept>
Get all concepts in a category
Find related concepts
Sourcepub fn add_concept(&mut self, concept: CodeConcept)
pub fn add_concept(&mut self, concept: CodeConcept)
Add a new concept
Sourcepub fn add_relationship(&mut self, relationship: ConceptRelationship)
pub fn add_relationship(&mut self, relationship: ConceptRelationship)
Add a concept relationship
Sourcepub fn get_all_concept_names(&self) -> Vec<String>
pub fn get_all_concept_names(&self) -> Vec<String>
Get all concept names
Sourcepub fn calculate_similarity(&self, concept1: &str, concept2: &str) -> f64
pub fn calculate_similarity(&self, concept1: &str, concept2: &str) -> f64
Calculate concept similarity
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConceptMapper
impl RefUnwindSafe for ConceptMapper
impl Send for ConceptMapper
impl Sync for ConceptMapper
impl Unpin for ConceptMapper
impl UnwindSafe for ConceptMapper
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> 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