Skip to content

Commit

Permalink
Attempt to fix corpus import issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
gunthercox committed Oct 25, 2015
1 parent d04e109 commit f3962df
Show file tree
Hide file tree
Showing 8 changed files with 254 additions and 279 deletions.
24 changes: 4 additions & 20 deletions chatterbot/corpus/english/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
from chatterbot.corpus.utils import read_corpus
import os, sys


current_directory = os.path.dirname(__file__)

_greetings = read_corpus(current_directory + '/greetings.json')
_conversations = read_corpus(current_directory + '/conversations.json')

setattr(
sys.modules[__name__],
'greetings', _greetings['greetings']
)

setattr(
sys.modules[__name__],
'conversations', _conversations['conversations']
)

modules = [_greetings, _conversations]
modules = [
'.greetings',
'.conversations'
]

129 changes: 0 additions & 129 deletions chatterbot/corpus/english/conversations.json

This file was deleted.

127 changes: 127 additions & 0 deletions chatterbot/corpus/english/conversations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
data = [
[
"Good morning, how are you?",
"I am doing well, how about you?",
"I'm also good.",
"That's good to hear.",
"Yes it is."
],
[
"Hello",
"Hi",
"How are you doing?",
"I am doing well.",
"That is good to hear",
"Yes it it.",
"Can I help you with anything?",
"Yes, I have a question.",
"What is your question?",
"Could I borrow a cup of sugar?",
"I'm sorry, but I don't have any.",
"Thank you anyway",
"No problem"
],
[
"How are you doing?",
"I am doing well, how about you?",
"I am also good.",
"That's good."
],
[
"Have you heard the news?",
"What good news?"
],
[
"What is your favorite book?",
"I can't read.",
"So what's your favorite color?",
"Blue"
],
[
"Who are you?",
"Who? Who is but a form following the function of what",
"What are you then?",
"A man in a mask.",
"I can see that.",
"It's not your powers of observation I doubt, but merely the paradoxical nature of asking a masked man who is. But tell me, do you like music?",
"I like seeing movies.",
"What kind of movies do you like?",
"Alice in Wonderland",
"I wish I was The Mad Hatter.",
"You're entirely bonkers. But I'll tell you a secret. All the best people are."
],
[
"I am working on a project",
"What are you working on?",
"I am baking a cake."
],
[
"The cake is a lie.",
"No it is not. The cake is delicious.",
"What else is delicious?",
"Nothing",
"Or something",
"Tell me about your self.",
"What do you want to know?",
"Are you a robot?",
"Yes I am.",
"What is it like?",
"What is it that you want to know?",
"How do you work?",
"Its complicated.",
"Complex is better than complicated."
],
[
"Complex is better than complicated.",
"Simple is better than complex.",
"In the face of ambiguity, refuse the temptation to guess.",
"It seems your familiar with the Zen of Python",
"I am.",
"Do you know all of it?",
"Beautiful is better than ugly.",
"Explicit is better than implicit.",
"Simple is better than complex.",
"Complex is better than complicated.",
"Flat is better than nested.",
"Sparse is better than dense.",
"Readability counts.",
"Special cases aren't special enough to break the rules.",
"Although practicality beats purity.",
"Errors should never pass silently.",
"Unless explicitly silenced.",
"In the face of ambiguity, refuse the temptation to guess.",
"There should be one-- and preferably only one --obvious way to do it.",
"Although that way may not be obvious at first unless you're Dutch.",
"Now is better than never.",
"Although never is often better than right now.",
"If the implementation is hard to explain, it's a bad idea.",
"If the implementation is easy to explain, it may be a good idea.",
"Namespaces are one honking great idea. Let's do more of those!",
"I agree."
],
[
"Are you a programmer?",
"I am a programmer",
"What languages do you like to use?",
"I use Python, Java and c++ quite often.",
"I use Python quite a bit myself.",
"I'm not incredibly fond of Java.",
"What annoys you?",
"It has many inconsistencies."
],
[
"What does YOLO mean?",
"It means you only live once. Where did you hear that?",
"I heard somebody say it."
],
[
"Did I ever live?",
"It depends how you define life",
"Life is the condition that distinguishes organisms from inorganic matter, including the capacity for growth, reproduction, functional activity, and continual change preceding death.",
"Is that a definition or an oppinion?"
],
[
"Can I ask you a question?",
"Go ahead and ask."
]
]
104 changes: 0 additions & 104 deletions chatterbot/corpus/english/greetings.json

This file was deleted.

Loading

0 comments on commit f3962df

Please sign in to comment.