Skip to content

Commit

Permalink
has built in meals data
Browse files Browse the repository at this point in the history
speed increasedlatest news added
  • Loading branch information
Jamster3000 committed Nov 21, 2023
1 parent ab3b788 commit ede5cec
Show file tree
Hide file tree
Showing 23 changed files with 17,714 additions and 412 deletions.
765 changes: 432 additions & 333 deletions Joan.py

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ correct-answer - The correct answer to a trivia question

list-games - a list of games that can be played with Joan

unsafe-scans - the amount of scans that returned as a dangerous website

food - food
______________________________________________________________________________________________________________

###data files###

The csv data files are named based on their letters

ET.csv - Entity tag
datasets/ET.csv - Entity tag

ER.csv - Emotion recognition
datasets/ER.csv - Emotion recognition

conversations.csv - For remembing past conversations

Expand Down
16 changes: 13 additions & 3 deletions conversations.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def neutral_response(user_emotion, emotion):
def bordem_fix():
internet = check_internet()

random_number = random.randint(1, 14)
random_number = 14# random.randint(1, 15)

user_data = chatbot_tools.get_user_data()
if user_data['fix bordem'] == '':
Expand Down Expand Up @@ -50,19 +50,29 @@ def bordem_fix():
print(chatbot_tools.random_output('read wikipedia suggestion'))
elif random_number == 13:
print(chatbot_tools.random_output('play akinator suggestion'))
elif random_number == 14:
result = requests.get('https://www.boredapi.com/api/activity/')
if result.status_code == 200:
result = result.json()

print(f"How about you try to {result['activity']}")

with open('data/expected context.txt', 'w') as w:
w.write('random activity')
else:
print(chatbot_tools.get_user_data()['fix bordem'])
return None

def suggest_food():
user_data = chatbot_tools.get_user_data()
suggest_meal()
'''user_data = chatbot_tools.get_user_data()
if user_data['favourite food'] == '':
print(chatbot_tools.random_output('unknown fix hunger').replace('<user-name>', user_data['first name']))
else:
print(chatbot_tools.random_output('fix hunger').replace('<F-food>', user_data['favourite food']).replace('<user-name>', user_data['first name']))
return None
return None'''

def greeting_response(user_input):
current_hour = datetime.datetime.now().hour
Expand Down
1 change: 0 additions & 1 deletion data/conversation.csv

This file was deleted.

File renamed without changes.
25 changes: 21 additions & 4 deletions data/ET.csv → data/datasets/ET.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name,ET
how to ,how to
hello,greeting
hi,greeting
hi there,greeting
Expand All @@ -9,6 +8,7 @@ yo,greeting
howdy,greeting
morning,greeting
afternoon,greeting
good afternoon,greeting
evening,greeting
night,greeting
bye,bye
Expand Down Expand Up @@ -48,6 +48,8 @@ random one,random wikihow article
search wikihow article,search wikihow
rps,play rps
tell me joke,tell joke
how to cook ,search
how to bake ,search
how about a joke,tell joke
something funny,tell joke
make me laugh,tell joke
Expand All @@ -56,6 +58,7 @@ shoot with joke,tell joke
tell me a joke,tell joke
tell me riddle,tell riddle
how about a riddle,tell riddle
how to ,how to
shoot with riddle,tell riddle
tell me a riddle,tell riddle
give me brain teaser,tell riddle
Expand Down Expand Up @@ -164,7 +167,7 @@ what weather like,current weather
weather now,current weather
current weather,current weather
weather tomorrow,weather tomorrow
what weather like tomorrow
what weather like tomorrow,
what weather tomorow,weather tomorrow
tomorrow weather,weather tomorrow
weather on ,weather day
Expand Down Expand Up @@ -203,7 +206,7 @@ why give name,why named
why Joan,why named
love me,love user
are robot,robot
are humna,human
are human,human
change your name,change bot name
are you real,real or not
where are you,where
Expand Down Expand Up @@ -258,6 +261,9 @@ what month,month
what year,year
tell me year,year
current year,year
space new,space news
latest space new,space news
show space new,space news
weather monday,weather monday
weather tuesday,weather tuesday
weather wednesday,weather wednesday
Expand Down Expand Up @@ -286,4 +292,15 @@ late news,latest news
tell late news,latest news
what go late news,latest news
what go world,latest news
what go world,latest news
what go world,latest news
scan current website,scan open website
scan open website,scan open website
scan copy website,scan copied website
search for ,search
show recipies for ,search
ingredients for ,ingredients
suggest meal,meal suggestion
what does it mean,"pronoun | third-person singular personal pronoun, refers to one inanimate object or to one person or animal with no gender or unknown gender"
thanls,You're welcome!
amazing,"1 | adjective | surprising greatly
2 | adjective | inspiring awe or admiration or wonder"
2 changes: 2 additions & 0 deletions data/SR.csv → data/datasets/SR.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ few more,positive
continue,positive
okay sure,positive
next,positive
sure why not,positive
url,positive
description,positive
open url,positive
Expand Down Expand Up @@ -85,6 +86,7 @@ I must decline,negative
not show,negative
forbidden it is,negative
the fates decree otherwise,negative
alright that enough,negative
I cannot in good conscience,negative
pass,negative
dont know,negative
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ede5cec

Please sign in to comment.