extract_generic | R Documentation |
This function searches a phrase for the position and length of expressions specified in a dictionary. This is called within other main functions of the package and generally not intended for use on its own.
extract_generic(phrase, dict)
phrase |
Text to search. |
dict |
data.frame, the first column should contain expressions to find. These can be regular expressions or exact phrases. |
extract_generic
is used to extract entities that are
identified with an associated dictionary of phrases or regular expressions,
such as dose change, frequency, intake time, route, or duration in
medExtractR
and medExtractR_tapering
, as well as
dose schedule, time keyword, transition, and preposition in medExtractR_tapering
. This function
is called within extract_entities
.
A numeric matrix with position and expression length.
data(frequency_vals) extract_generic("take two every day", dict = frequency_vals) extract_generic("take two every morning", dict = data.frame(c("morning", "every morning")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.