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

Commit 5a55e6e

Browse files
author
Cipher
committed
Deeper fix
1 parent 13fdf0c commit 5a55e6e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Janex/main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ def ResponseGenerator(self, most_similar_response):
249249
if token == word:
250250
syns = thesaurus[word]["synonyms"]
251251
new_word = random.choice(syns)
252+
for x in deletion:
253+
if token.endswith(x):
254+
new_word = new_word + x
252255
tokens[i] = new_word
253256

254257
syns = thesaurus[word]["synonyms"]
@@ -257,6 +260,9 @@ def ResponseGenerator(self, most_similar_response):
257260
if token == synonym:
258261
syns = thesaurus[word]["synonyms"]
259262
new_word = random.choice(syns)
263+
for x in deletion:
264+
if token.endswith(x):
265+
new_word = new_word + x
260266
tokens[i] = new_word
261267

262268
generated_response = " ".join(tokens)

0 commit comments

Comments
 (0)