Search through a series for queries based on a regex query.

run_search(
  strings,
  query,
  regex = "\\bquery\\b",
  type,
  category,
  ids,
  column
)

Arguments

strings

Vector of strings to search through. Strings are from the chosen corpus.

query

String query term to search for in the strings. Taken from the chosen lexicon.

regex

String regular expression defining the strings should be searched. Defaults to searching for the query term with non word characters either side

type

String query type. Derived from lexicon type.

category

String query type. Derived from lexicon type.

ids

id of the string

column

String column name examined included in the returned dataframe

Value

dataframe with counts of the query in each string