string_suggestions {medExtractR} | R Documentation |
This function searches for text within one or more phrases, and looks for partial matches. An exact match of the text should be found in order for a suggestion to made.
string_suggestions(strings, search_data, max_dist = 2, ignore.case = TRUE)
strings |
character vector; value(s) to find |
search_data |
character vector; phrase(s) where values may exist |
max_dist |
numeric; edit distance to use for partial matches. The default value is 2. |
ignore.case |
logical; indicates if spelling case matters, defaulting to ‘TRUE’ |
data.frame with two columns, ‘suggestion’ and ‘match’
string_suggestions('penicillin', 'penicillan, penicillin, or penicilin?')