reloadAllDic: reload all Hannanum analyzer dictionary

View source: R/manageDic.R

reloadAllDicR Documentation

reload all Hannanum analyzer dictionary

Description

Mainly, user dictionary reloading for Hannanum Analyzer. If you want to update user dictionary on KoNLP_dic/current/dic_user.txt, need to execute this function after editing dictionary.

Usage

reloadAllDic()

Examples

## 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()
## End(Not run)

haven-jeon/KoNLP documentation built on June 13, 2025, 7:33 a.m.