Learn R Programming

KoNLP (version 0.80.2)

buildDictionary: buildDictionary

Description

buildDictionary

Usage

buildDictionary(ext_dic = "woorimalsam", category_dic_nms = "",
  user_dic = data.frame(), replace_usr_dic = F, verbose = F)

Arguments

ext_dic

external dictionary character name which can be 'woorimalsam', 'insighter', 'sejong'.

category_dic_nms

character vectors. category dictionary will be used. 'all' means all categories will be added.

  • all

  • general

  • chemical

  • language

  • music

  • history

  • education

  • society in general

  • life

  • physical

  • information and communication

  • medicine

  • earth

  • construction

  • veterinary science

  • business

  • law

  • plant

  • buddhism

  • engineering general

  • folk

  • administration

  • economic

  • math

  • korean medicine

  • military

  • literature

  • clothes

  • religion normal

  • animal

  • agriculture

  • astronomy

  • transport

  • natural plain

  • industry

  • medium

  • political

  • geography

  • mining

  • hearing

  • fishing

  • machinery

  • catholic

  • book title

  • named

  • electrical and electronic

  • pharmacy

  • art, music and physical

  • useless

  • ocean

  • forestry

  • christian

  • craft

  • service

  • sports

  • food

  • art

  • environment

  • video

  • natural resources

  • industry general

  • smoke

  • philosophy

  • health general

  • proper names general

  • welfare

  • material

  • humanities general

user_dic

data.frame which include 'word' and 'tag(KAIST)' fields. User can add more user defined terms and tags.

replace_usr_dic

A logical scala. Should user dictionary needs to be replaced with new user defined dictionary or appended.

verbose

will print detail progress. default FALSE

Examples

Run this code
# NOT RUN {
dics <- c('sejong','woorimalsam')
category <- c('sports')
user_d <- data.frame(term="apple", tag='ncn')
buildDictionary(ext_dic = dics,category_dic_nms = category, user_dic = user_d, replace_usr_dic=F)
#accumulate user dictionary only
buildDictionary(ext_dic= "", user_dic = user_d, replace_usr_dic=F)
#get user dictionary as data.frame
usr_words  <- get_dictionary('user_dic')
# }

Run the code above in your browser using DataLab