string_suggestions {medExtractR}R Documentation

Find Strings and Suggest Misspellings

Description

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.

Usage

string_suggestions(strings, search_data, max_dist = 2, ignore.case = TRUE)

Arguments

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’

Value

data.frame with two columns, ‘suggestion’ and ‘match’

Examples

string_suggestions('penicillin', 'penicillan, penicillin, or penicilin?')

[Package medExtractR version 0.4.1 Index]