Learn R Programming

quanteda (version 0.9.9-65)

as.yaml: convert quanteda dictionary objects to the YAML format

Description

Converts a quanteda dictionary object constructed by the dictionary function into the YAML format. The YAML files can be editied in text editors and imported into quanteda again.

Usage

as.yaml(x)

Arguments

x

dictionary object

Value

as.yaml returns a dictionary in the YAML format

Examples

Run this code
# NOT RUN {
dict <- dictionary(file = '/home/kohei/Documents/Dictionary/LaverGarry.txt', format = 'wordstat')
yaml <- as.yaml(dict)
cat(yaml, file = '/home/kohei/Documents/Dictionary/LaverGarry.yaml')
# }

Run the code above in your browser using DataLab