ratsgo / embedding

한국어 임베딩 (Sentence Embeddings Using Korean Corpora)
https://ratsgo.github.io/embedding
MIT License
452 stars 129 forks source link

코드 3-2 한국어 위키백과 전처리 python #126

Closed zeran4 closed 3 years ago

zeran4 commented 3 years ago

수정 내역의 코드를 가져다가 해도 다음과 같은 에러가 발생합니다. (실행은 도커에서 했음 : docker run -it --rm ratsgo/embedding-cpu bash)

wiki = WikiCorpus(in_f, tokenizer_func=tokenize, dictionary=Dictionary()) Traceback (most recent call last): File "", line 1, in NameError: name 'tokenize' is not defined

그래서 다음과 같이 tokenize를 불러왔더니 정상처리됐습니다.

from gensim.corpora.wikicorpus import tokenize

zeran4 commented 3 years ago

다음 내용에 사용자 정의 tokenize()가 있어서 Close 시킵니다.