pub struct AaOutput {
pub id: String,
pub abbreviation_type: AbbreviationType,
pub short_form: String,
pub long_form: String,
pub short_token_count: i32,
pub short_character_count: i32,
pub long_token_count: i32,
pub long_character_count: i32,
pub positional_info: AaPosInfo,
}
Expand description
Main “Secondary” struct of program Acronyms and Abbreviations detected by MetaMap
Fields§
§id: String
Unique identifier
abbreviation_type: AbbreviationType
Abbreviation type: either MetaMap defined or User-defined
short_form: String
Short form of the acronym/abbreviation
long_form: String
Long form or expansion
short_token_count: i32
number of tokens (including whitespace) in short form
short_character_count: i32
number of characters in short form
long_token_count: i32
number of tokens (including whitespace) in long form
long_character_count: i32
number of characters in long form
positional_info: AaPosInfo
starting position of short form followed by “:” followed by character length of short form
Implementations§
Source§impl AaOutput
impl AaOutput
Sourcepub fn assemble(parts: HashMap<&str, &str>) -> Result<Self, Box<dyn Error>>
pub fn assemble(parts: HashMap<&str, &str>) -> Result<Self, Box<dyn Error>>
Parses a hashmap into AaOutput 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 AaOutput
types,
parse_record
will probably be much more practical since it
accepts a string reference and does the field tagging/mapping for you.