Struct mmi_parser::MmiOutput
source · [−]pub struct MmiOutput {
pub id: String,
pub mmi: String,
pub score: f64,
pub name: String,
pub cui: String,
pub semantic_types: Vec<String>,
pub triggers: Vec<Trigger>,
pub location: Location,
pub positional_info: Vec<Position>,
pub tree_codes: Option<Vec<String>>,
}Expand description
Main struct for entire library. Represents an entire fielded MMI record as one type.
Fields
id: Stringunique identifier
mmi: Stringalways MMI
score: f64score of concept relevance, 0-1000, 1000 being perfect
name: Stringname of the concept matched
cui: StringCUI for identified UMLS concept
semantic_types: Vec<String>Semantic Type abbreviations
triggers: Vec<Trigger>Triggers for MMI to flag this concept
location: LocationLocation of concept
positional_info: Vec<Position>Positional information of concept
tree_codes: Option<Vec<String>>Optional MeSH tree code(s)
Implementations
sourceimpl MmiOutput
impl MmiOutput
sourcepub fn new(parts: HashMap<&str, &str>) -> Self
pub fn new(parts: HashMap<&str, &str>) -> Self
Parses a hashmap into MMiOutput field types. Utilizes all other functionality defined in this module to assemble/parse each field into its appropriate format and types.
While this function is useful for building MmiOutput types,
parse_mmi will probably be much more practical since it
accepts a string reference and does the field tagging/mapping for you.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for MmiOutput
impl<'de> Deserialize<'de> for MmiOutput
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for MmiOutput
Auto Trait Implementations
impl RefUnwindSafe for MmiOutput
impl Send for MmiOutput
impl Sync for MmiOutput
impl Unpin for MmiOutput
impl UnwindSafe for MmiOutput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more