def target_in_utterance_uncapped(bot_utterance, target, USE_model) -> float: bot_sentences = re.split(r'[.!?]+', bot_utterance) bot_sentences[:] = [x for x in bot_sentences if x] best_target_closeness = 0.0 for bot_sentence in bot_sentences: target_closeness = USE_similarity(bot_sentence, target, USE_model) if target_closeness > best_target_closeness: best_target_closeness = target_closeness return best_target_closeness