NOTES

Define data

regex_spelling_normalization

Regular expression rules for spelling normalization tailored to projects of the Centre for Democracy Studies Aarau (ZDA).

regex_spelling_normalization <-
  tibble::tibble(id = character(),
                 category = character(),
                 purpose = character(),
                 pattern = list(),
                 replacement = character()) %>%
  # harmonize spelling
  tibble::add_row(id = "title_fa",
                  category = "harmonize_spelling",
                  purpose = "harmonize spelling of the [_FOKUS Aargau_](https://fokus.ag/) project title",
                  pattern = list("Fokus(?=[ -]Aargau)"),
                  replacement = "FOKUS") %>%
  tibble::add_row(id = "title_smartvote",
                  category = "harmonize_spelling",
                  purpose = "harmonize spelling of the [_smartvote_](https://smartvote.ch/) VAA",
                  pattern = list("\\bSmartvote\\b"),
                  replacement = "smartvote")

Write data

Save all the bigger data objects to separate files under data/*.rda. Note that when documenting them, they mustn't be explicitly @exported since they're already automatically exported and thus available to package users.

usethis::use_data(regex_spelling_normalization,
                  internal = FALSE,
                  overwrite = TRUE,
                  compress = "xz",
                  version = 3L)


salim-b/salim documentation built on May 3, 2024, 9:38 a.m.