Skip to contents

Returns terms that occur in text using case-insensitive fixed-string matching.

Usage

find_text_hits(text, terms)

Arguments

text

Character scalar text to search.

terms

Character vector of terms.

Value

Character vector of matched terms.

Examples

find_text_hits(
  text = "The report discusses boat access and stream flow.",
  terms = c("boat access", "ordinary high water", "flow")
)
#> [1] "boat access" "flow"