Crate mmi_parser

Source
Expand description

This crate exists to support the primary functions of the MMI parser command line tool.

The primary reference for the field information is found here and relies on MetaMap 2016 or newer.

The main functionality is encompassed in MmiOutput, AaOutput, and parse_record.

For questions on implementations of the parsing algorithms for specific sections, please consult the source which contains well-labeled and fairly documented functions to parse each type.

Structs§

AaOutput
Main “Secondary” struct of program Acronyms and Abbreviations detected by MetaMap
AaPosInfo
Abbreviation and Acronym position information
MmiOutput
Main struct for entire library. Represents an entire fielded MMI record as one type.
Position
Structure for Position representing start index, length, and Position Type.
Trigger
Struct to represent Trigger information.
ValueError
ValueError occurs when an invalid value was provided

Enums§

AbbreviationType
Which type of abbreviation (AA) record exists, either AA or UA (user-defined)
Location
Enumeration for Location options.
Output
PositionalInfoType
Positional Information type options

Functions§

check_parts
Simple utility function to check whether
label_aa_parts
Labels AA records with the corresponding field names
parse_position_parts
parse_record
A better alternative to MmiOutput::assemble or AaOutput::assemble Takes a string reference, splits it on vertical bar (pipe) characters, labels each item with its corresponding field name, passes labeled data into MmiOutput::assemble or AaOutput::assemble.