gunthercox / ChatterBot

ChatterBot is a machine learning, conversational dialog engine for creating chat bots
https://chatterbot.readthedocs.io
BSD 3-Clause "New" or "Revised" License
14.11k stars 4.45k forks source link

spacy german language model #1687

Open DuffyTheDuck opened 5 years ago

DuffyTheDuck commented 5 years ago

Is there a way to set spacy to use my german language model? If it is possible, what settings i have to use?

I have: from chatterbot.languages import GER and: bot = ChatBot( 'Duffy', language=GER, read_only=False, filters=['filters.get_recent_repeated_responses'], preprocessors=['chatterbot.preprocessors.clean_whitespace'], storage_adapter='chatterbot.storage.SQLStorageAdapter', logic_adapters=[{ "import_path": "chatterbot.logic.BestMatch", "statement_comparison_function": "chatterbot.comparisons.jaccard_similarity" }], database_uri='sqlite:///database.db' )

DuffyTheDuck commented 5 years ago

:-) in comparsions.py i set self.nlp = spacy.load("de_core_news_md") same in tagging.py in bot.py comparsion = spacy_similarity

and the results are really awesome can be closed