Bugfixes
This commit is contained in:
parent
445a32f6a2
commit
251ccfdeca
@ -17,7 +17,7 @@ stop_word=\x00
|
||||
max_wrds=30
|
||||
max_msgs=5
|
||||
endsen=.....!!?
|
||||
garbage=«<{([.!?;\-—"/*&^#$|#$%^&*(№;%:?*])}>»
|
||||
garbage=«<{([.!?;\-—"/*&^#$|#$^&*(№;:?*])}>»
|
||||
garbage_entities=mention,text_mention,bot_command,url,email
|
||||
|
||||
[media_checker]
|
||||
|
@ -6,7 +6,7 @@ class TrigramRepository(RedisRepository):
|
||||
def __init__(self):
|
||||
RedisRepository.__init__(self, source_name='trigrams:{}:{}')
|
||||
self.counter_source = 'trigrams:count:{}'
|
||||
self.separator = config['grammar']['separator']
|
||||
self.separator = config['grammar']['sep']
|
||||
self.stop_word = config['grammar']['stop_word']
|
||||
|
||||
def store(self, chat_id, trigrams):
|
||||
|
@ -89,8 +89,7 @@ class ReplyGenerator:
|
||||
for _ in range(self.max_wrds):
|
||||
words = key.split(self.sep)
|
||||
|
||||
# Исправил ошибку тут !!!!!!
|
||||
gen_words.append(words[0] if len(gen_words) == 0 else words[1])
|
||||
gen_words.append(words[1])
|
||||
|
||||
next_word = self.trigram_repository.get_random_reply(chat_id, key)
|
||||
if next_word is None:
|
||||
|
Loading…
Reference in New Issue
Block a user