대충벌레 블로그
article thumbnail
728x90
반응형

여러가지 블로그를 뒤져보다가 제가 성공했던 블로그를 참고하여 작성했습니다.

rsas.tistory.com/242

 

(R1)제15강(3.1) R응용(II) - KoNLP 설치 !!!

지난 번에는 성공했는데, R-4.0.2를 설치하고 다시 KoNLP를 설치하려다가 실패 인터넷에 있는 자료들을 이리 저리 찾아 보기를 여러 번... 수차례의 시행착오 끝에 설치를 성공 시행착오를 여러 번

rsas.tistory.com

명령어만 보실려면 하단의 정리를 참고해주세요.

 

1) multilinguer 설치

> install.packages("multilinguer")
Installing package into ‘라이브러리 경로가 출력’
(as ‘lib’ is unspecified)
URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/multilinguer_0.0.4.zip'을 시도합니다
Content type 'application/zip' length 45828 bytes (44 KB)
downloaded 44 KB

package ‘multilinguer’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	경로 출력

2) multilinguer 실행

library(multilinguer)

3) multilinguer::install_jdk() 실행

> multilinguer::install_jdk() 
URL 'https://corretto.aws/downloads/latest/amazon-corretto-11-x64-windows-jdk.zip'을 시도합니다
Content type 'application/zip' length 186585821 bytes (177.9 MB)
downloaded 177.9 MB


Restarting R session...

4) 의존성 패키지 설치

install.packages(c("hash", "tau", "Sejong", "RSQLite", "devtools", "bit", "rex",
                   "lazyeval", "htmlwidgets", "crosstalk", "promises", "later",
                   "sessioninfo", "xopen", "bit64", "blob", "DBI", "memoise", "plogr",
                   "covr", "DT", "rcmdcheck", "rversions"), type = "binary")

5) remotes 설치 KoNLP 설치

remotes

> install.packages("remotes")
# 실행결과
Installing package into ‘E:/soldesk/r_study/R/win-library/4.0’
(as ‘lib’ is unspecified)
URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/remotes_2.2.0.zip'을 시도합니다
Content type 'application/zip' length 388017 bytes (378 KB)
downloaded 378 KB

package ‘remotes’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\semin\AppData\Local\Temp\RtmpC2TYXF\downloaded_packages

Remotes::install 실행

remotes::install_github('haven-jeon/KoNLP', upgrade = "never",
                          INSTALL_opts=c("--no-multiarch"))
Downloading GitHub repo haven-jeon/KoNLP@HEAD
WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
√  checking for file 'C:\Users\semin\AppData\Local\Temp\RtmpC2TYXF\remotes11042e903417\haven-jeon-KoNLP-c43430c/DESCRIPTION' (341ms)
-  preparing 'KoNLP': (1s)
√  checking DESCRIPTION meta-information ... 
-  checking for LF line-endings in source and make files and shell scripts (339ms)
-  checking for empty or unneeded directories
-  looking to see if a 'data/datalist' file should be added
-  building 'KoNLP_0.80.2.tar.gz'
   
Installing package into ‘E:/soldesk/r_study/R/win-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package 'KoNLP' ...
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'KoNLP'
    finding HTML links ... 완료
    HangulAutomata                          html  
    KtoS                                    html  
    MorphAnalyzer                           html  
    SimplePos09                             html  
    SimplePos22                             html  
    StoK                                    html  
    backupUsrDic                            html  
    buildDictionary                         html  
    concordance_file                        html  
    concordance_str                         html  
    convertHangulStringToJamos              html  
    convertHangulStringToKeyStrokes         html  
    convertTag                              html  
    editweights                             html  
    extractNoun                             html  
    get_dictionary                          html  
    is.ascii                                html  
    is.hangul                               html  
    is.jaeum                                html  
    is.jamo                                 html  
    is.moeum                                html  
    mergeUserDic                            html  
    mutualinformation                       html  
    reloadAllDic                            html  
    reloadUserDic                           html  
    restoreUsrDic                           html  
    scala_library_install                   html  
    statDic                                 html  
    tags                                    html  
    useNIADic                               html  
    useSejongDic                            html  
    useSystemDic                            html  
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
[1] "DEBUG start"
[1] "E:/soldesk/r_study/R/win-library/4.0/00LOCK-KoNLP/00new/KoNLP/java/scala-library-2.11.8.jar"
[1] "My R is over 3.2.0"
[1] "scala-library target url: https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.8/scala-library-2.11.8.jar"
[1] "'method' parameter for download.file() function in your R:  wininet"
URL 'https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.8/scala-library-2.11.8.jar'을 시도합니다
Content type 'application/java-archive' length 5744974 bytes (5.5 MB)
==================================================
downloaded 5.5 MB

[1] TRUE
[1] 5744974
Successfully installed Scala runtime library in E:/soldesk/r_study/R/win-library/4.0/00LOCK-KoNLP/00new/KoNLP/java/scala-library-2.11.8.jar
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (KoNLP)

6) KoNLP 실행

library(KoNLP) #최종적으로 "KoNLP" 패키지를 불러옵니다
extractNoun('테스트 입니다')

 

🔔 명령어 정리

install.packages("multilinguer")

library(multilinguer)

multilinguer::install_jdk() 

install.packages(c("hash", "tau", "Sejong", "RSQLite", "devtools", "bit", "rex",
                   "lazyeval", "htmlwidgets", "crosstalk", "promises", "later",
                   "sessioninfo", "xopen", "bit64", "blob", "DBI", "memoise", "plogr",
                   "covr", "DT", "rcmdcheck", "rversions"), type = "binary")
                   
install.packages("remotes")

remotes::install_github('haven-jeon/KoNLP', upgrade = "never",
                          INSTALL_opts=c("--no-multiarch"))
                          
library(KoNLP) #최종적으로 "KoNLP" 패키지를 불러옵니다
extractNoun('테스트 입니다')
반응형

'IT 기술 > R' 카테고리의 다른 글

R언어 공부정리 [8]  (0) 2021.01.27
R언어 공부정리 [7]  (0) 2021.01.25
R언어 공부 정리 [6]  (0) 2021.01.22
R언어 공부 정리 [5]  (0) 2021.01.21
R언어 공부 정리 [4]  (2) 2021.01.20
profile

대충벌레 블로그

@대충벌레

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!