Merge c70f091182e76676209295ce51452f5d84df54f1 into be6a4f1e9d8a22d41b7d42c22df9d7ef36f225d2

This commit is contained in:
00080000 2026-07-21 03:36:46 +00:00 committed by GitHub
commit f6fdb96dd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ def get_first(text: str) -> str:
return text
def merge_short_text_in_array(texts: str, threshold: int) -> list:
def merge_short_text_in_array(texts: List[str], threshold: int) -> list:
if (len(texts)) < 2:
return texts
result = []

View File

@ -13,7 +13,7 @@ normalizer = lambda x: cn2an.transform(x, "an2cn")
current_file_path = os.path.dirname(__file__)
pinyin_to_symbol_map = {
line.split("\t")[0]: line.strip().split("\t")[1]
for line in open(os.path.join(current_file_path, "opencpop-strict.txt")).readlines()
for line in open(os.path.join(current_file_path, "opencpop-strict.txt"), encoding="utf-8").readlines()
}
import jieba_fast

View File

@ -14,7 +14,7 @@ normalizer = lambda x: cn2an.transform(x, "an2cn")
current_file_path = os.path.dirname(__file__)
pinyin_to_symbol_map = {
line.split("\t")[0]: line.strip().split("\t")[1]
for line in open(os.path.join(current_file_path, "opencpop-strict.txt")).readlines()
for line in open(os.path.join(current_file_path, "opencpop-strict.txt"), encoding="utf-8").readlines()
}
import jieba_fast