Open CGyan10 opened 2 years ago
Following. I'm getting a lot of problems that have to do with outdated modules.
looks like it was answered here. https://github.com/gunthercox/ChatterBot/issues/2194
I got my bot to work. I also had this issue. I think I installed the old Spacy, and downloaded the old embeddings manually. I can only get my bot to work on Python 3.7 but it works. I'm also using the "Chatterbot2" module. If I use just plain Chatterbot it still freaks out. I had to install alot of the requirements manually. I hope this helps someone. I'm not sure if I installed Chatterbot2 directly from Github using pip but I may have. Sorry if I can't remember details clearly but I have memory problems. Anyway those are some ideas some of you can try if you want.
do you like this:
class ENGSM: ISO_639_1 = 'en_core_web_sm'
chatbot = ChatBot( "Charlie", tagger_language=ENGSM # <-- this is a language )
tagger_language
.If you prefer not to create a new class in your script, you can modify the existing ENG
class in languages.py
to use the full model name.
class ENG:
ISO_639_1 = 'en_core_web_sm' # Change this to 'en_core_web_sm'
ISO_639 = 'eng'
ENGLISH_NAME = 'English'
No changes are needed in your script if you choose this option. The ChatBot
will automatically use the modified ENG
class.
This option involves creating a new language class ENGSM that uses the correct spaCy model name. Here’s how to implement it:
ENGSM
to languages.py
with the correct model name.
class ENG: ISO_639_1 = 'en' ISO_639 = 'eng' ENGLISH_NAME = 'English'
class ENGSM: # Add this new class ISO_639_1 = 'en_core_web_sm' ISO_639 = 'eng' ENGLISH_NAME = 'English'
2. Use the New Class in Your Script:
``` python
from chatterbot.languages import ENGSM
chatbot = ChatBot(
"Example Bot",
tagger_language=ENGSM
)
database_uri='sqlite:///database.sqlite3'
error when run code with above line
error shows
[E941] Can't find model 'en'. It looks like you're trying to load a model from a shortcut, which is obsolete as of spaCy v3.0. To load the model, use its full name instead:
nlp = spacy.load("en_core_web_sm")