Skip to content

Commit

Permalink
Fix _on_scraping with replied message
Browse files Browse the repository at this point in the history
  • Loading branch information
AlberLC committed Jun 11, 2022
1 parent 74e2d5e commit bf5eab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion multibot/bots/multi_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def _parse_callbacks(
for keywords_group in registered_callback.keywords:
text_words += [original_text_word for original_text_word in original_text_words if original_text_word in keywords_group]
word_matches = flanautils.cartesian_product_string_matching(text_words, keywords_group, min_ratio=registered_callback.min_ratio)
ratio = sum((max(matches.values()) + 1) ** ratio_reward_exponent for text_word, matches in word_matches.items())
ratio = sum((max(matches.values()) + 1) ** ratio_reward_exponent for matches in word_matches.values())
try:
ratio /= max(1., keywords_lenght_penalty * len(keywords_group))
except ZeroDivisionError:
Expand Down

0 comments on commit bf5eab5

Please sign in to comment.