ChatterBot icon indicating copy to clipboard operation
ChatterBot copied to clipboard

a suggestion to make chatterbot compatible with PyInstaller

Open brightening-eyes opened this issue 6 years ago • 2 comments

hi, I have a suggestion that makes chatterbot possible to be compiled with pyinstaller. first, chatterbot uses spacy.load which pyinstaller can't recognize it as it uses shortcuts. instead, it should use normal import to load the language model. also, it should be possible to specify the language model (en_core_web_sm, en_core_web_md, en_core_web_lg etc), since as far as i know, en_core_web_sm doesn't support word vectors.

brightening-eyes avatar Jul 18 '19 06:07 brightening-eyes

I'm not very familiar with pyinstaller. Does it have any advantages over pip (pip is kind of the standard package installer for Python).

I do like the idea of using imports for data, this sounds like something that might be useful to look into.

gunthercox avatar Jul 26 '19 22:07 gunthercox

PyInstaller compiles your python code into executable. and as spacy.load loads the language by it's simlink to the package folder, it can't recognize it. putting PyInstaller aside, using spacy.load('en') for example is not recommended (spacy developers recommend to use imports). my idea is to get a nlp object, or getting the package name by it's string like "en_core_web_lg" in order to support word vectors.

brightening-eyes avatar Jul 27 '19 06:07 brightening-eyes