data_dictionary_uk2us: English UK-US spelling conversion dictionary

data_dictionary_uk2usR Documentation

English UK-US spelling conversion dictionary

Description

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

Usage

data_dictionary_uk2us

data_dictionary_us2uk

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.

An object of class dictionary2 of length 1738.

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

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 April 13, 2022, 12:53 a.m.