Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WikipediaResponseAdapter #1748

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add WikipediaResponseAdapter #1748

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 9, 2019

Adds a logic_adapter from which the response is obtained from Wikipedia.

you can test this pull request using this code.

from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer

chatbot = ChatBot('Ron Obvious',
                  storage_adapter='chatterbot.storage.SQLStorageAdapter',
                  logic_adapters=[
                      {
                          'import_path': 'chatterbot.logic.BestMatch'
                      },
                      {
                          'import_path': 'chatterbot.logic.WikipediaResponseAdapter',
                      }
                  ])

trainer = ChatterBotCorpusTrainer(chatbot)

# Train the chatbot based on the english corpus
trainer.train("chatterbot.corpus.english")

print(chatbot.get_response('What is Cat?'))

@ghost ghost mentioned this pull request Jun 9, 2019
@matbrgz
Copy link

matbrgz commented May 21, 2020

A Feature Flag could be a nice implementation for make able to set this off.

Congratz, nice commit. .

@ahmet-soner
Copy link

Where can I save these codes and how can I use them in the project? Can you help a little more with wikipedia adapter?
logicadapter wikipedia
9a30db2

[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants