# 提取句子中的关键词及其近似词
def extract_keywords_and_similars(sentence, custom_keywords, similarity_threshold=0.5):
words = jieba.lcut(sentence)
result = {}
for keyword in custom_keywords:
extracted_words = [word for word in words if is_similar(keyword, word, similarity_threshold) or keyword == word]
if extracted_words:
result[keyword] = extracted_words
return result