dictionary_edit: Conveniently edit dictionaries

View source: R/dictionary_edit.R

dictionary_editR Documentation

Conveniently edit dictionaries

Description

Provides convenient editing of dictionaries, using an interactive editor.

'list_edit()' and 'char_edit()' provide lower-level convenience functions for interactive editing of (lists of) character objects. These can be useful for instance in editing stopword lists.

Usage

dictionary_edit(x, ...)

list_edit(x, ...)

char_edit(x, ...)

Arguments

x

a [dictionary] or (list of) character elements

...

(optional) arguments passed to [utils::edit()] (such as the choice of editor)

Value

an edited version of the input object

Examples

# edit the positive and negative entries from the LSD2015
## Not run: 
my_posneg_dict <- dictionary_edit(data_dictionary_LSD2015[1:2])
## End(Not run)

# edit the system stopwords
## Not run: 
my_stopwords <- stopwords("en", source = "snowball") %>%
    char_edit()
## End(Not run)

kbenoit/quanteda.dictionaries documentation built on Feb. 9, 2023, 3:28 p.m.