Git Product home page Git Product logo

Comments (3)

junhewk avatar junhewk commented on May 27, 2024

Windows 경우 function 내에서 utils::localeToCharset()으로 받아와서 iconv를 다시 돌리는 부분이 있었는데, 이 부분에서 오류가 발생하는 것으로 파악되어 삭제하고 writeLines function으로 교체했습니다. 제 시스템에서는 문제없이 입출력되네요.

> text
[1] "행태소 분석 테스트 중입니다."

> Encoding(text)
[1] "UTF-8"

> pos(text)
$`행태소 분석 테스트 중입니다.`
[1] "행태/NNG"      "소/XPN"        "분석/NNG"      "테스트/NNG"    "중/NNB"        "입니다/VCP+EF" "./SF"         

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RmecabKo_0.1.6.2

loaded via a namespace (and not attached):
 [1] httr_1.3.1      compiler_3.5.0  R6_2.2.2        magrittr_1.5    tools_3.5.0     withr_2.1.2     curl_3.2       
 [8] memoise_1.1.0   Rcpp_0.12.17    stringi_1.2.2   git2r_0.21.0    digest_0.6.15   stringr_1.3.1   devtools_1.13.5

전체적으로 정리해서 R cran version도 업데이트 하겠습니다.

참고로 Windows에서도 binary installation이 가능한 RcppMeCab을 며칠 전에 올렸습니다. C++ 단에서 UTF-8으로 인코딩을 return하도록 했기 때문에 문제없이 사용하실 수 있을 것 같은데, 테스트해 보시겠어요? 참고로 RmecabKo 또한 RcppMeCab을 base로 하여 구동하도록 전체적으로 routine을 수정할 계획입니다.

from rmecabko.

drjtryu avatar drjtryu commented on May 27, 2024

윈도우에서 RmecabKo를 설치하면, pos에서는 인코딩 문제가 발생하고, nouns에서는 정상적으로 동작합니다. pos에서는 iconv를 통해서 UTF-8로 변경해서 사용하였더니 정상적으로 동작하네요.다만 noun도 pos하고 같이 iconv를 적용하니, 이 때는 정상적인 결과를 나타내지 못했습니다. 그냥 인코딩을 변경하지 쓸 때는 정상적으로 작동하더군요. pos하고, nouns가 같이 일관성이 있어야 할 듯한데, 그렇지 않습니다. 이 부분 확인 부탁드립니다.

결과 샘플은 아래와 같습니다.

print(pos("반갑습니다"))
$반갑습니다
[1] "戼㸹\u0770愼㸹戼㹤/SY" "挼㸰戼㸴/SN" "ϴ/SL"
[4] "搼㸹/SY"

print(nouns("반갑습니다 안녕"))
$반갑습니다 안녕
[1] "안녕"

from rmecabko.

junhewk avatar junhewk commented on May 27, 2024

github 에 0.1.7.0 을 업데이트했습니다. 아직 수정할 부분이 있긴 한데 인코딩 문제는 해결되었을 겁니다.
확인해 보시겠어요?

from rmecabko.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.