sigilyph 0.0.1__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of sigilyph might be problematic. Click here for more details.
- sigilyph-0.2.1/MANIFEST.in +3 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/PKG-INFO +1 -1
- {sigilyph-0.0.1 → sigilyph-0.2.1}/setup.py +6 -3
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph/__init__.py +5 -2
- sigilyph-0.2.1/sigilyph/core/cache_dir/en_tn_tagger.fst +0 -0
- sigilyph-0.2.1/sigilyph/core/cache_dir/en_tn_verbalizer.fst +0 -0
- sigilyph-0.2.1/sigilyph/core/cache_dir/zh_tn_tagger.fst +0 -0
- sigilyph-0.2.1/sigilyph/core/cache_dir/zh_tn_verbalizer.fst +0 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph/core/norm_func.py +14 -6
- sigilyph-0.2.1/sigilyph/core/py2phone.dict +2165 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph/core/sigilyph_class.py +8 -8
- sigilyph-0.2.1/sigilyph/core/special_dict.json +26 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph/core/symbols.py +3 -2
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph.egg-info/PKG-INFO +1 -1
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph.egg-info/SOURCES.txt +8 -1
- {sigilyph-0.0.1 → sigilyph-0.2.1}/README.md +0 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/setup.cfg +0 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph/core/__init__.py +0 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph/core/g2p_func.py +0 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph/core/predict.py +0 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph/core/preprocess.py +0 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph/core/text_process.py +0 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph.egg-info/dependency_links.txt +0 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph.egg-info/requires.txt +0 -0
- {sigilyph-0.0.1 → sigilyph-0.2.1}/sigilyph.egg-info/top_level.txt +0 -0
|
@@ -5,12 +5,12 @@ Author: Yixiang Chen
|
|
|
5
5
|
version:
|
|
6
6
|
Date: 2025-03-24 15:57:41
|
|
7
7
|
LastEditors: Yixiang Chen
|
|
8
|
-
LastEditTime: 2025-08-12
|
|
8
|
+
LastEditTime: 2025-08-12 19:35:01
|
|
9
9
|
'''
|
|
10
10
|
|
|
11
11
|
from setuptools import setup, find_packages
|
|
12
12
|
|
|
13
|
-
VERSION = '0.
|
|
13
|
+
VERSION = '0.2.1'
|
|
14
14
|
DESCRIPTION = 'Text Front for TTS'
|
|
15
15
|
#LONG_DESCRIPTION = 'Data Package for TTS with a slightly longer description'
|
|
16
16
|
LONG_DESCRIPTION = open("README.md", encoding="utf-8").read()
|
|
@@ -26,7 +26,10 @@ setup(
|
|
|
26
26
|
long_description=LONG_DESCRIPTION,
|
|
27
27
|
long_description_content_type="text/markdown",
|
|
28
28
|
url="https://github.com/yixiangchen1995/python-Sigilyph",
|
|
29
|
-
packages=
|
|
29
|
+
packages=(
|
|
30
|
+
find_packages()
|
|
31
|
+
),
|
|
32
|
+
include_package_data=True,
|
|
30
33
|
install_requires=[
|
|
31
34
|
'g2p_en',
|
|
32
35
|
'jieba',
|
|
@@ -5,7 +5,10 @@ Author: Yixiang Chen
|
|
|
5
5
|
version:
|
|
6
6
|
Date: 2025-05-13 11:01:07
|
|
7
7
|
LastEditors: Yixiang Chen
|
|
8
|
-
LastEditTime: 2025-08-12
|
|
8
|
+
LastEditTime: 2025-08-12 17:49:48
|
|
9
9
|
'''
|
|
10
10
|
|
|
11
|
-
from sigilyph.core.sigilyph_class import Sigilyph
|
|
11
|
+
from sigilyph.core.sigilyph_class import Sigilyph
|
|
12
|
+
|
|
13
|
+
from sigilyph.core.symbols import all_phone_dict
|
|
14
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,7 +5,7 @@ Author: Yixiang Chen
|
|
|
5
5
|
version:
|
|
6
6
|
Date: 2025-03-31 17:50:26
|
|
7
7
|
LastEditors: Yixiang Chen
|
|
8
|
-
LastEditTime: 2025-08-12
|
|
8
|
+
LastEditTime: 2025-08-12 17:26:56
|
|
9
9
|
'''
|
|
10
10
|
|
|
11
11
|
|
|
@@ -16,17 +16,25 @@ from sigilyph.core.symbols import punctuation, punc_map_ch
|
|
|
16
16
|
from tn.chinese.normalizer import Normalizer as ZhNormalizer
|
|
17
17
|
from tn.english.normalizer import Normalizer as EnNormalizer
|
|
18
18
|
|
|
19
|
+
|
|
20
|
+
import os
|
|
21
|
+
from importlib_resources import files
|
|
22
|
+
basedir = files('sigilyph')
|
|
23
|
+
|
|
19
24
|
#zh_tn_model = ZhNormalizer(remove_erhua=False, full_to_half=False)
|
|
20
25
|
#en_tn_model = EnNormalizer()
|
|
21
|
-
zh_tn_model = ZhNormalizer(cache_dir='./sigilyph/core/cache_dir', remove_erhua=False, full_to_half=False)
|
|
22
|
-
en_tn_model = EnNormalizer(cache_dir='./sigilyph/core/cache_dir')
|
|
26
|
+
#zh_tn_model = ZhNormalizer(cache_dir='./sigilyph/core/cache_dir', remove_erhua=False, full_to_half=False)
|
|
27
|
+
#en_tn_model = EnNormalizer(cache_dir='./sigilyph/core/cache_dir')
|
|
28
|
+
zh_tn_model = ZhNormalizer(cache_dir=os.path.join(basedir, 'core', 'cache_dir'), remove_erhua=False, full_to_half=False)
|
|
29
|
+
en_tn_model = EnNormalizer(cache_dir=os.path.join(basedir, 'core', 'cache_dir'))
|
|
23
30
|
|
|
24
31
|
import json
|
|
25
32
|
#import sys
|
|
26
33
|
#sys.path.append('text_front')
|
|
27
34
|
#with open('./special_dict.json', 'r', encoding="utf-8") as infi:
|
|
28
35
|
#with open('./text_front/special_dict.json', 'r', encoding="utf-8") as infi:
|
|
29
|
-
with open('./sigilyph/core/special_dict.json', 'r', encoding="utf-8") as infi:
|
|
36
|
+
#with open('./sigilyph/core/special_dict.json', 'r', encoding="utf-8") as infi:
|
|
37
|
+
with open(os.path.join(basedir, 'core', 'special_dict.json'), 'r', encoding="utf-8") as infi:
|
|
30
38
|
special_dict = json.load(infi)
|
|
31
39
|
|
|
32
40
|
def pro_norm(text, use_lang='zh'):
|
|
@@ -51,14 +59,14 @@ pre_replace_dict = {"AlphaFold-Plus": "AlphaFold Plus"}
|
|
|
51
59
|
def preprocess_first_old(text, use_lang='zh'):
|
|
52
60
|
text = replace_with_dict(text, pre_replace_dict)
|
|
53
61
|
norm_text = pro_norm(text, use_lang)
|
|
54
|
-
print(norm_text)
|
|
62
|
+
#print(norm_text)
|
|
55
63
|
rep_text = replace_with_dict(norm_text, special_dict)
|
|
56
64
|
return rep_text
|
|
57
65
|
|
|
58
66
|
def preprocess_first(text, before_replace_dict, special_word_dict, norm_use_lang='zh'):
|
|
59
67
|
text = replace_with_dict(text, before_replace_dict)
|
|
60
68
|
norm_text = pro_norm(text, norm_use_lang)
|
|
61
|
-
print(norm_text)
|
|
69
|
+
#print(norm_text)
|
|
62
70
|
rep_text = replace_with_dict(norm_text, special_word_dict)
|
|
63
71
|
return rep_text
|
|
64
72
|
|