buildDictionary: buildDictionary

Description Usage Arguments Examples

Description

buildDictionary

Usage

1
2
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.

  • 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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')

## End(Not run)

KoNLP documentation built on May 1, 2019, 9:25 p.m.