Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit aa8124e

Browse files
author
Cipher
committed
Added thesaurus. Ready for official 0.0.15 upload
1 parent 4f26ef1 commit aa8124e

File tree

6 files changed

+257
-6
lines changed

6 files changed

+257
-6
lines changed

Janex.egg-info/PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: Janex
3-
Version: 0.0.15a0
3+
Version: 0.0.15rc0
44
Home-page: https://github.com/Cipher58
55
Download-URL: https://github.com/Cipher58/Janex-Python.git
66
Author: Cipher58

Janex/main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def SynonymCompare(self, word):
174174
for associate in thesaurus[word]["related"]:
175175
random_newword = random.choice(thesaurus[word]["related"])
176176

177-
return random_newword
177+
return random_newword
178178

179179
def ResponseGenerator(self, most_similar_response):
180180
thesaurus = self.load_thesaurus()
@@ -183,9 +183,10 @@ def ResponseGenerator(self, most_similar_response):
183183

184184
for i, token in enumerate(tokens):
185185
for word in thesaurus:
186-
if token == thesaurus[word]["synonyms"]:
187-
newword = self.SynonymCompare(word)
188-
tokens[i] = newword
186+
for synonym in thesaurus[word]["synonyms"]:
187+
if token in synonym:
188+
newword = self.SynonymCompare(word)
189+
tokens[i] = newword
189190

190191
generated_response = " ".join(tokens)
191192

Janex/thesaurus.json

Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
{
2+
"happy": {
3+
"synonyms": ["joyful", "content", "pleased", "ecstatic", "elated", "happy"],
4+
"related": ["cheerful", "delighted", "satisfied", "blissful", "jubilant"]
5+
},
6+
"sad": {
7+
"synonyms": ["unhappy", "miserable", "depressed", "heartbroken", "gloomy"],
8+
"related": ["melancholy", "dismal", "downhearted", "despondent", "despairing"]
9+
},
10+
"beautiful": {
11+
"synonyms": ["gorgeous", "stunning", "lovely", "attractive", "charming"],
12+
"related": ["elegant", "mesmerizing", "exquisite", "enchanting", "radiant"]
13+
},
14+
"angry": {
15+
"synonyms": ["furious", "irate", "outraged", "indignant", "incensed"],
16+
"related": ["enraged", "fuming", "infuriated", "livid", "exasperated"]
17+
},
18+
"brave": {
19+
"synonyms": ["courageous", "fearless", "valiant", "heroic", "daring"],
20+
"related": ["bold", "gallant", "fear-defying", "intrepid", "valorous"]
21+
},
22+
"fast": {
23+
"synonyms": ["quick", "speedy", "rapid", "swift", "expeditious"],
24+
"related": ["hasty", "fleet", "brisk", "accelerated", "nimble"]
25+
},
26+
"small": {
27+
"synonyms": ["tiny", "little", "miniature", "minute", "compact"],
28+
"related": ["petite", "diminutive", "microscopic", "undersized", "wee"]
29+
},
30+
"big": {
31+
"synonyms": ["large", "huge", "enormous", "gigantic", "massive"],
32+
"related": ["immense", "colossal", "vast", "monumental", "tremendous"]
33+
},
34+
"good": {
35+
"synonyms": ["excellent", "superb", "wonderful", "terrific", "fantastic", "good"],
36+
"related": ["great", "awesome", "outstanding", "amazing", "splendid", "wonderful"]
37+
},
38+
"bad": {
39+
"synonyms": ["terrible", "horrible", "awful", "dreadful", "atrocious"],
40+
"related": ["abysmal", "appalling", "disastrous", "lousy", "woeful"]
41+
},
42+
"smart": {
43+
"synonyms": ["intelligent", "clever", "wise", "bright", "brilliant"],
44+
"related": ["knowledgeable", "astute", "sharp", "savvy", "perceptive"]
45+
},
46+
"funny": {
47+
"synonyms": ["humorous", "amusing", "comical", "hilarious", "witty"],
48+
"related": ["entertaining", "jovial", "jocular", "lighthearted", "mirthful"]
49+
},
50+
"difficult": {
51+
"synonyms": ["challenging", "hard", "complicated", "complex", "tricky"],
52+
"related": ["demanding", "arduous", "strenuous", "problematic", "daunting"]
53+
},
54+
"more": {
55+
"synonyms": ["more", "extra", "else"],
56+
"related": ["further", "furthermore", "extra", "even more", "additional"]
57+
},
58+
"say": {
59+
"synonyms": ["say", "speaks"],
60+
"related": ["state", "say", "assert"]
61+
},
62+
"strong": {
63+
"synonyms": ["powerful", "robust", "sturdy", "mighty", "potent"],
64+
"related": ["forceful", "vigorous", "resilient", "unyielding", "indomitable"]
65+
},
66+
"kind": {
67+
"synonyms": ["compassionate", "benevolent", "generous", "considerate", "thoughtful"],
68+
"related": ["gentle", "sympathetic", "empathetic", "caring", "tender"]
69+
},
70+
"cold": {
71+
"synonyms": ["chilly", "freezing", "frigid", "icy", "frosty"],
72+
"related": ["cool", "numb", "polar", "subzero", "wintry"]
73+
},
74+
"hot": {
75+
"synonyms": ["sweltering", "scorching", "sizzling", "boiling", "burning"],
76+
"related": ["sultry", "torrid", "blistering", "fiery", "heated"]
77+
},
78+
"tired": {
79+
"synonyms": ["exhausted", "weary", "fatigued", "drained", "spent"],
80+
"related": ["drowsy", "sleepy", "worn-out", "enervated", "frazzled"]
81+
},
82+
"calm": {
83+
"synonyms": ["serene", "tranquil", "peaceful", "composed", "placid"],
84+
"related": ["relaxed", "untroubled", "undisturbed", "soothing", "mellow"]
85+
},
86+
"happy": {
87+
"synonyms": ["joyful", "content", "pleased", "ecstatic", "elated", "happy"],
88+
"related": ["cheerful", "delighted", "satisfied", "blissful", "jubilant"]
89+
},
90+
"afraid": {
91+
"synonyms": ["scared", "frightened", "terrified", "nervous", "anxious"],
92+
"related": ["apprehensive", "panicked", "worried", "fearful", "jittery"]
93+
},
94+
"honest": {
95+
"synonyms": ["truthful", "sincere", "upright", "genuine", "honorable"],
96+
"related": ["trustworthy", "faithful", "reliable", "scrupulous", "loyal"]
97+
},
98+
"bright": {
99+
"synonyms": ["luminous", "radiant", "brilliant", "shining", "gleaming"],
100+
"related": ["vivid", "glowing", "dazzling", "beaming", "glittering"]
101+
},
102+
"shy": {
103+
"synonyms": ["bashful", "timid", "reserved", "reticent", "introverted"],
104+
"related": ["modest", "coy", "nervous", "hesitant", "self-effacing"]
105+
},
106+
"sick": {
107+
"synonyms": ["ill", "unwell", "ailing", "infirmed", "under the weather"],
108+
"related": ["weak", "queasy", "indisposed", "vomiting", "feverish"]
109+
},
110+
"quiet": {
111+
"synonyms": ["silent", "peaceful", "serene", "hushed", "muted"],
112+
"related": ["tranquil", "calm", "noiseless", "still", "muffled"]
113+
},
114+
"excited": {
115+
"synonyms": ["thrilled", "enthusiastic", "eager", "animated", "jubilant"],
116+
"related": ["ecstatic", "elated", "rapturous", "exhilarated", "passionate"]
117+
},
118+
"tasty": {
119+
"synonyms": ["delicious", "savory", "appetizing", "delectable", "yummy"],
120+
"related": ["flavorful", "palatable", "scrumptious", "mouthwatering", "tantalizing"]
121+
},
122+
"beautiful": {
123+
"synonyms": ["gorgeous", "stunning", "lovely", "attractive", "charming"],
124+
"related": ["elegant", "mesmerizing", "exquisite", "enchanting", "radiant"]
125+
},
126+
"angry": {
127+
"synonyms": ["furious", "irate", "outraged", "indignant", "incensed"],
128+
"related": ["enraged", "fuming", "infuriated", "livid", "exasperated"]
129+
},
130+
"vast": {
131+
"synonyms": ["enormous", "immense", "boundless", "expansive", "limitless"],
132+
"related": ["gigantic", "colossal", "massive", "huge", "tremendous"]
133+
},
134+
"loud": {
135+
"synonyms": ["noisy", "boisterous", "cacophonous", "blaring", "deafening"],
136+
"related": ["clamorous", "raucous", "thunderous", "uproarious", "piercing"]
137+
},
138+
"happy": {
139+
"synonyms": ["joyful", "content", "pleased", "ecstatic", "elated", "happy"],
140+
"related": ["cheerful", "delighted", "satisfied", "blissful", "jubilant"]
141+
},
142+
"sad": {
143+
"synonyms": ["unhappy", "miserable", "depressed", "heartbroken", "gloomy"],
144+
"related": ["melancholy", "dismal", "downhearted", "despondent", "despairing"]
145+
},
146+
"hot": {
147+
"synonyms": ["sweltering", "scorching", "sizzling", "boiling", "burning"],
148+
"related": ["sultry", "torrid", "blistering", "fiery", "heated"]
149+
},
150+
"bright": {
151+
"synonyms": ["luminous", "radiant", "brilliant", "shining", "gleaming"],
152+
"related": ["vivid", "glowing", "dazzling", "beaming", "glittering"]
153+
},
154+
"strange": {
155+
"synonyms": ["unusual", "peculiar", "odd", "bizarre", "weird"],
156+
"related": ["curious", "abnormal", "mysterious", "eccentric", "quirky"]
157+
},
158+
"empty": {
159+
"synonyms": ["vacant", "void", "bare", "deserted", "unoccupied"],
160+
"related": ["hollow", "barren", "desolate", "devoid", "blank"]
161+
},
162+
"calm": {
163+
"synonyms": ["serene", "tranquil", "peaceful", "composed", "placid"],
164+
"related": ["relaxed", "untroubled", "undisturbed", "soothing", "mellow"]
165+
},
166+
"cold": {
167+
"synonyms": ["chilly", "freezing", "frigid", "icy", "frosty"],
168+
"related": ["cool", "numb", "polar", "subzero", "wintry"]
169+
},
170+
"long": {
171+
"synonyms": ["lengthy", "extended", "prolonged", "endless", "never-ending"],
172+
"related": ["long-lasting", "lingering", "continual", "interminable", "eternal"]
173+
},
174+
"short": {
175+
"synonyms": ["brief", "concise", "succinct", "compact", "abrupt"],
176+
"related": ["quick", "fleeting", "transient", "momentary", "ephemeral"]
177+
},
178+
"tall": {
179+
"synonyms": ["high", "towering", "elevated", "lofty", "giant"],
180+
"related": ["statuesque", "sky-scraping", "majestic", "colossal", "immense"]
181+
},
182+
"wet": {
183+
"synonyms": ["damp", "moist", "drenched", "soggy", "soaked"],
184+
"related": ["humid", "watery", "drizzly", "sopping", "saturated"]
185+
},
186+
"dry": {
187+
"synonyms": ["arid", "parched", "thirsty", "barren", "dehydrated"],
188+
"related": ["bone-dry", "deserted", "waterless", "sterile", "drought-stricken"]
189+
},
190+
"rich": {
191+
"synonyms": ["wealthy", "affluent", "prosperous", "opulent", "well-to-do"],
192+
"related": ["abundant", "plentiful", "loaded", "well-off", "moneyed"]
193+
},
194+
"poor": {
195+
"synonyms": ["impoverished", "destitute", "needy", "indigent", "deprived"],
196+
"related": ["penurious", "broke", "bankrupt", "struggling", "impecunious"]
197+
},
198+
"old": {
199+
"synonyms": ["elderly", "aged", "mature", "vintage", "senior"],
200+
"related": ["ancient", "antique", "time-worn", "hoary", "time-honored"]
201+
},
202+
"new": {
203+
"synonyms": ["fresh", "novel", "innovative", "modern", "contemporary"],
204+
"related": ["recent", "current", "up-to-date", "unfamiliar", "state-of-the-art"]
205+
},
206+
"old-fashioned": {
207+
"synonyms": ["outdated", "antiquated", "obsolete", "vintage", "archaic"],
208+
"related": ["retro", "dated", "bygone", "old-school", "nostalgic"]
209+
},
210+
"modern": {
211+
"synonyms": ["contemporary", "up-to-date", "current", "innovative", "progressive", "modern"],
212+
"related": ["advanced", "futuristic", "trendy", "cutting-edge", "state-of-the-art"]
213+
},
214+
"brilliant": {
215+
"synonyms": ["dazzling", "radiant", "shining", "glittering", "glowing", "brilliant"],
216+
"related": ["sparkling", "vivid", "resplendent", "luminous", "effulgent"]
217+
},
218+
"stupid": {
219+
"synonyms": ["foolish", "idiotic", "dim-witted", "dense", "dull"],
220+
"related": ["dumb", "silly", "brain-dead", "ignorant", "imbecilic"]
221+
},
222+
"simple": {
223+
"synonyms": ["easy", "uncomplicated", "straightforward", "plain", "basic"],
224+
"related": ["elementary", "effortless", "undemanding", "uninvolved", "uncomplicated"]
225+
},
226+
"complex": {
227+
"synonyms": ["complicated", "intricate", "involved", "elaborate", "multi-faceted"],
228+
"related": ["difficult", "convoluted", "intricate", "perplexing", "challenging"]
229+
},
230+
"expensive": {
231+
"synonyms": ["costly", "pricey", "high-priced", "lavish", "valuable"],
232+
"related": ["luxurious", "premium", "extravagant", "exorbitant", "sumptuous"]
233+
},
234+
"cheap": {
235+
"synonyms": ["inexpensive", "affordable", "low-cost", "economical", "bargain"],
236+
"related": ["budget-friendly", "reasonable", "thrifty", "cost-effective", "economy"]
237+
},
238+
"dangerous": {
239+
"synonyms": ["hazardous", "risky", "perilous", "treacherous", "unsafe"],
240+
"related": ["life-threatening", "unsafe", "precarious", "life-endangering", "reckless"]
241+
},
242+
"safe": {
243+
"synonyms": ["secure", "protected", "harmless", "unhurt", "untouched"],
244+
"related": ["out of danger", "secure", "shielded", "guarded", "unscathed"]
245+
},
246+
"assist": {
247+
"synonyms": ["help", "aid", "support", "aid", "abet"],
248+
"related": ["facilitate", "aid", "serve", "contribute", "back"]
249+
}
250+
}

dist/Janex-0.0.15b0.tar.gz

7.69 KB
Binary file not shown.

dist/Janex-0.0.15rc0.tar.gz

7.7 KB
Binary file not shown.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
name="Janex",
99

1010
# version of the module
11-
version="0.0.15b",
11+
version="0.0.15c",
1212

1313
# Name of Author
1414
author="Cipher58",

0 commit comments

Comments
 (0)