Giter VIP home page Giter VIP logo

Comments (2)

Minku-Koo avatar Minku-Koo commented on August 24, 2024

KoBERT 설치 경로에 한글이 포함되어 나오는 에러 같습니다.
https://tech-diary.tistory.com/26 참고해보세요.

해결 방법 공유합니다. (위 링크와 동일 내용)

  1. kobert가 설치되어있는 파일을 찾아갑니다.
    예시) C:/Users/사용자/kobert/

  2. kobert_news_wiki_ko_cased-1087f8699e.spiece 파일을 한글 경로가 없는 곳으로 복사해줍니다.
    예시) 한글 경로가 포함되지 않은 "C 드라이브"로 옯겨줍니다.

  3. sentencepiece 라이브러리 설치 경로로 이동
    예시) C:/ProgramData/Anaconda3/lib/site-packages/sentencepiece/init.py

  4. init.py 파일을 열어서 171 라인을 수정해줍니다.
    (기존)

return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)

(수정)

try:
    arg = arg.replace("\\","/") # 파일 경로 구분자를 통일시켜줍니다.
    return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)
except OSError:
    # 2번에서 파일을 복사한 디렉터리의 경로를 path에 적어줍니다.
    path = "C:/" #예시
    arg = path + arg.split("/")[-1]
    return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)

from kobert.

haven-jeon avatar haven-jeon commented on August 24, 2024

감사합니다. 도움이 된거 같습니다. 해당 이슈는 클로즈 하겠습니다.

from kobert.

Related Issues (20)

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.