-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Description
at this page
from gensim import corpora
dictionary = corpora.Dictionary(texts)
dictionary.save('/tmp/deerwester.dict') # store the dictionary, for future reference
print(dictionary)
got fileNotFoundError
I used below code goes fine
from gensim import corpora
import os
dictionary = corpora.Dictionary(texts)
save_dir = './tmp'
os.makedirs(save_dir, exist_ok=True)
save_path = os.path.join(save_dir, 'deerwester.dict')
dictionary.save(save_path)
print(dictionary)
By the way I use Python 3.11.11
Metadata
Metadata
Assignees
Labels
No labels