-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
26 lines (17 loc) · 855 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import catpuns
def replace_words(sentence:str, synonyms:str):
'''Replaces complete full words with cattified words dictionary'''
cat_sentence = sentence
if synonyms == "" or synonyms.upper()[0] == 'Y':
for key, value in catpuns.synonym_dict.items():
cat_sentence = cat_sentence.replace(key, value)
for key, value in catpuns.word_dict.items():
cat_sentence = cat_sentence.replace(key, value)
for key, value in catpuns.syllable_dict.items():
cat_sentence = cat_sentence.replace(key, value)
if sentence != cat_sentence:
cat_sentence = cat_sentence + " :3"
return cat_sentence
phrase = input('Enter a sentence: ')
synonyms = input("Would you like some words replaced with synonyms for maximum catification? Enter Y to be a cool cat: ")
print(replace_words(phrase, synonyms))