Takes a wide format lexicon and creates a long form lexicon file. The long form lexicon can then be passed to the LE-CAT search function. Wide format lexicons should have the columns for type and category, query terms should start at the query column and continue along the row. Each category should have one row per category.

parse_lexicon(
  wide_lexicon,
  type_column = "Type",
  category_column = "Category",
  query_column = "Query"
)

Arguments

wide_lexicon

Data frame with one row per category containing type, category and the corresponding queries

type_column

Column name in the wide_lexicon which contains the category type

category_column

Column name in the wide_lexicon which contains the category of interest

query_column

Column name in the wide_lexicon where the first query term is located. Additional queries should be in the subsequent columns until the end of the row.

Value

If a wide format lexicon and the correct column names are passed to this function then a long format lexicon is returned. The long format lexicon has the columns Type, Category and Query.