library(magrittr)
library(readr)
library(knitr)

# Helper functions
print_yin_csv <- . %>%
    file.path(system.file("structures", package = "yinarlingi"), .) %>%
    read_csv() %>%
    kable()

print_yin_file <- . %>%
    file.path(system.file("structures", package = "yinarlingi"), .) %>%
    read_file()

# Set global knitr options
opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)

Code definitions

print_yin_csv("wlp_code-definitions.csv")

Parts of speech values

print_yin_csv("wlp_values_parts-of-speech.csv")

Block attributes grammar

`r print_yin_file("wlp_block-attributes.ne")`

Entry structure grammar

`r print_yin_file("wlp_skeleton-simple.ne")`

Regular expressions

The list of regular expressions defined below can be retrieved using the use_wlp_regex() function, e.g. str_extract(string = "\\me jaala (PV): (H,Wi,Y)", pattern = use_wlp_regex("me_sse_value")).

`r print_yin_file("wlp_regexes.R")`

Blacklisted characters

The table below lists characters which are blacklisted as they break the processing pipeline (e.g. causes resulting XML to be invalid).

system.file("structures/wlp_values_blacklist.csv", package = "yinarlingi") %>%
    read_csv() %>%
    dplyr::mutate_all(dplyr::funs(stringr::str_replace_all(., "\\\\(?!u)", "\\\\\\\\"))) %>%
    dplyr::mutate_all(dplyr::funs(stringr::str_replace_all(., "\\*", "\\\\*"))) %>%
    dplyr::mutate_all(dplyr::funs(stringr::str_replace_all(., "\\!", "\\\\!"))) %>%
    dplyr::mutate_all(dplyr::funs(stringr::str_replace_all(., "\\\\u", "\\\\\\\\u"))) %>%
    dplyr::rename(`regex (R)` = regex) %>% 
    kable()


CoEDL/yinarlingi documentation built on Feb. 20, 2020, 4:30 a.m.