KoNLP (version 0.80.2)

mergeUserDic: appending or replacing with new data.frame

Description

appending new dictionary to current dictionary. replaceing current dictionary with new dictionary.

Usage

mergeUserDic(newUserDic, append = TRUE, verbose = FALSE, ask = FALSE)

Arguments

newUserDic

new user dictionary as data.frame

append

append or replacing

verbose

see detail error logs

ask

ask to backup

Examples

Run this code
# NOT RUN {
## This codes can not be run if you don't have encoding system 
## which can en/decode Hangul(ex) CP949, EUC-KR, UTF-8). 
dicpath <- file.path(system.file(package="Sejong"), "dics", "handic.zip")
conn <- unz(dicpath, file.path("data","kE","dic_user2.txt"))
newdic <- read.csv(conn, sep="\t", header=FALSE, fileEncoding="UTF-8", stringsAsFactors=FALSE)
mergeUserDic(newdic)
## backup merged new dictionary
backupUsrDic(ask=FALSE)
## restore from backup directory
restoreUsrDic(ask=FALSE)
## reloading new dictionary
reloadAllDic()
# }

Run the code above in your browser using DataLab