SherryLiu 4 ماه پیش
والد
کامیت
34e27a9735
1فایلهای تغییر یافته به همراه0 افزوده شده و 16 حذف شده
  1. 0 16
      whisper.py

+ 0 - 16
whisper.py

@@ -162,22 +162,6 @@ def fuzzy_correct_chinese(text, correct_terms):
                 corrected_words.append(word)
     return ''.join(corrected_words)
 
-# def fuzzy_correct_chinese(text, correct_terms):
-#     words = jieba.cut(text)
-#     corrected_words = []
-#     for word in words:
-#         if word in error_correction:
-#             corrected_words.append(error_correction[word])
-#         else:
-#             for term in correct_terms:
-#                 if compare_chinese_words(word, term, tone_sensitive=True):
-#                     print(f"corrected: {word} -> {term}")
-#                     corrected_words.append(term)
-#                     break
-#             else:
-#                 corrected_words.append(word)
-#     return ''.join(corrected_words)
-
 
 def post_process_transcript(transcript, temperature=0):
     correct_terms = ["溫室氣體", "碳排放", "碳管理", "碳盤查", "碳權交易", "碳費",