코드 3-2 한국어 위키백과 전처리 python
zeran4 opened this issue · comments
JEHOON SHIN commented
수정 내역의 코드를 가져다가 해도 다음과 같은 에러가 발생합니다. (실행은 도커에서 했음 : 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
JEHOON SHIN commented
다음 내용에 사용자 정의 tokenize()가 있어서 Close 시킵니다.