data_dictionary_uk2us: English UK-US spelling conversion dictionary

Description Usage Format Details Source Examples

Description

quanteda dictionary format objects mapping UK to US spellings and vice-versa.

Usage

1
2
3

Format

A dictionary where the key is the English variant to which conversion is desired, and the values are spelling variants in English variant from which conversion is desired.

Details

These dictionaries provide the ability to homogenize (or homogenise!) the spellings of English by converting the spelling variants of one language to the other. To make all English spellings British, for instance, apply the data_dictionary_us2uk dictionary. To make all English spellings American, apply data_dictionary_uk2us.

Source

http://www.tysto.com/uk-us-spelling-list.html

Examples

1
2
3
4
5
6
7
8
txt <- c(uk = "endeavour to prioritise honour over esthetics",
         us = "endeavor to prioritize honor over aesthetics")
toks <- quanteda::tokens(txt)

quanteda::tokens_lookup(toks, data_dictionary_uk2us, exclusive = FALSE,
                        capkeys = FALSE)
quanteda::tokens_lookup(toks, data_dictionary_us2uk, exclusive = FALSE,
                        capkeys = FALSE)

kbenoit/quanteda.dictionaries documentation built on May 30, 2019, 11:40 p.m.