Skip to content

Add WikipediaResponseAdapter#1748

Open
ghost wants to merge 1 commit intomasterfrom
unknown repository
Open

Add WikipediaResponseAdapter#1748
ghost wants to merge 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@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
Copy Markdown

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
Copy Markdown

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

prgfiles@gmail.com

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.

3 participants