WeTextProcessing 1.0.4.1__tar.gz → 1.2.0__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.
Files changed (553) hide show
  1. wetextprocessing-1.2.0/.clang-format +93 -0
  2. wetextprocessing-1.2.0/.flake8 +14 -0
  3. wetextprocessing-1.2.0/.github/workflows/runtime.yml +22 -0
  4. wetextprocessing-1.2.0/.github/workflows/unittest.yml +83 -0
  5. wetextprocessing-1.2.0/.github/workflows/wheels.yml +71 -0
  6. wetextprocessing-1.2.0/.gitignore +47 -0
  7. wetextprocessing-1.2.0/.pre-commit-config.yaml +23 -0
  8. wetextprocessing-1.2.0/CPPLINT.cfg +2 -0
  9. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/PKG-INFO +15 -9
  10. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/WeTextProcessing.egg-info/PKG-INFO +15 -9
  11. wetextprocessing-1.2.0/WeTextProcessing.egg-info/SOURCES.txt +527 -0
  12. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/WeTextProcessing.egg-info/entry_points.txt +0 -1
  13. wetextprocessing-1.2.0/WeTextProcessing.egg-info/requires.txt +11 -0
  14. wetextprocessing-1.2.0/itn/README.md +60 -0
  15. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/__main__.py +1 -1
  16. wetextprocessing-1.2.0/itn/chinese/data/number/repeat_digit.tsv +322 -0
  17. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/time/minute.tsv +0 -9
  18. wetextprocessing-1.2.0/itn/chinese/data/time/minute_zero.tsv +9 -0
  19. wetextprocessing-1.2.0/itn/chinese/data/train_number/prefix.tsv +7 -0
  20. wetextprocessing-1.2.0/itn/chinese/inverse_normalizer.py +98 -0
  21. wetextprocessing-1.2.0/itn/chinese/rules/cardinal.py +178 -0
  22. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/rules/char.py +3 -3
  23. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/rules/date.py +16 -22
  24. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/rules/fraction.py +19 -12
  25. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/rules/license_plate.py +9 -13
  26. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/rules/math.py +9 -9
  27. wetextprocessing-1.2.0/itn/chinese/rules/measure.py +116 -0
  28. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/rules/money.py +22 -18
  29. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/rules/postprocessor.py +5 -6
  30. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/rules/time.py +27 -16
  31. wetextprocessing-1.2.0/itn/chinese/rules/train_number.py +36 -0
  32. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/rules/whitelist.py +5 -6
  33. wetextprocessing-1.2.0/itn/chinese/test/data/cardinal.txt +29 -0
  34. wetextprocessing-1.2.0/itn/chinese/test/data/char.txt +2 -0
  35. wetextprocessing-1.2.0/itn/chinese/test/data/date.txt +10 -0
  36. wetextprocessing-1.2.0/itn/chinese/test/data/fraction.txt +3 -0
  37. wetextprocessing-1.2.0/itn/chinese/test/data/license_plate.txt +3 -0
  38. wetextprocessing-1.2.0/itn/chinese/test/data/math.txt +6 -0
  39. wetextprocessing-1.2.0/itn/chinese/test/data/measure.txt +44 -0
  40. wetextprocessing-1.2.0/itn/chinese/test/data/money.txt +11 -0
  41. wetextprocessing-1.2.0/itn/chinese/test/data/normalizer.txt +33 -0
  42. wetextprocessing-1.2.0/itn/chinese/test/data/normalizer_disable_standalone_number_disable_0_to_9.txt +42 -0
  43. wetextprocessing-1.2.0/itn/chinese/test/data/normalizer_disable_standalone_number_enable_0_to_9.txt +11 -0
  44. wetextprocessing-1.2.0/itn/chinese/test/data/normalizer_enable_standalone_number_disable_0_to_9.txt +42 -0
  45. wetextprocessing-1.2.0/itn/chinese/test/data/number.txt +35 -0
  46. wetextprocessing-1.2.0/itn/chinese/test/data/time.txt +12 -0
  47. wetextprocessing-1.2.0/itn/chinese/test/data/train_number.txt +7 -0
  48. wetextprocessing-1.2.0/itn/chinese/test/data/whitelist.txt +2 -0
  49. wetextprocessing-1.2.0/itn/chinese/test/normalizer_test.py +117 -0
  50. {WeTextProcessing-1.0.4.1/tn → wetextprocessing-1.2.0/itn}/chinese/test/utils.py +3 -3
  51. wetextprocessing-1.2.0/itn/english/data/currency.tsv +168 -0
  52. wetextprocessing-1.2.0/itn/english/data/date_period.tsv +10 -0
  53. wetextprocessing-1.2.0/itn/english/data/electronic/domain.tsv +10 -0
  54. wetextprocessing-1.2.0/itn/english/data/electronic/server_name.tsv +17 -0
  55. wetextprocessing-1.2.0/itn/english/data/electronic/symbols.tsv +22 -0
  56. wetextprocessing-1.2.0/itn/english/data/electronic/url_symbols.tsv +5 -0
  57. wetextprocessing-1.2.0/itn/english/data/magnitudes.tsv +4 -0
  58. wetextprocessing-1.2.0/itn/english/data/measurements.tsv +149 -0
  59. wetextprocessing-1.2.0/itn/english/data/months.tsv +12 -0
  60. wetextprocessing-1.2.0/itn/english/data/months_cased.tsv +12 -0
  61. wetextprocessing-1.2.0/itn/english/data/numbers/digit.tsv +9 -0
  62. wetextprocessing-1.2.0/itn/english/data/numbers/hundred.tsv +1 -0
  63. wetextprocessing-1.2.0/itn/english/data/numbers/teen.tsv +10 -0
  64. wetextprocessing-1.2.0/itn/english/data/numbers/thousands.tsv +22 -0
  65. wetextprocessing-1.2.0/itn/english/data/numbers/ties.tsv +9 -0
  66. wetextprocessing-1.2.0/itn/english/data/ordinals/digit.tsv +9 -0
  67. wetextprocessing-1.2.0/itn/english/data/time/minute_to.tsv +59 -0
  68. wetextprocessing-1.2.0/itn/english/data/time/time_suffix.tsv +8 -0
  69. wetextprocessing-1.2.0/itn/english/data/time/time_suffix_cased.tsv +8 -0
  70. wetextprocessing-1.2.0/itn/english/data/time/time_zone.tsv +7 -0
  71. wetextprocessing-1.2.0/itn/english/data/time/time_zone_cased.tsv +7 -0
  72. wetextprocessing-1.2.0/itn/english/data/time/to_hour.tsv +12 -0
  73. wetextprocessing-1.2.0/itn/english/data/whitelist.tsv +417 -0
  74. wetextprocessing-1.2.0/itn/english/data/whitelist_tech.tsv +450 -0
  75. wetextprocessing-1.2.0/itn/english/data/year_suffix.tsv +6 -0
  76. wetextprocessing-1.2.0/itn/english/inverse_normalizer.py +96 -0
  77. wetextprocessing-1.2.0/itn/english/rules/cardinal.py +136 -0
  78. wetextprocessing-1.2.0/itn/english/rules/char.py +29 -0
  79. wetextprocessing-1.2.0/itn/english/rules/date.py +220 -0
  80. wetextprocessing-1.2.0/itn/english/rules/decimal.py +85 -0
  81. wetextprocessing-1.2.0/itn/english/rules/electronic.py +76 -0
  82. wetextprocessing-1.2.0/itn/english/rules/measure.py +115 -0
  83. wetextprocessing-1.2.0/itn/english/rules/money.py +145 -0
  84. wetextprocessing-1.2.0/itn/english/rules/ordinal.py +52 -0
  85. wetextprocessing-1.2.0/itn/english/rules/punctuation.py +31 -0
  86. wetextprocessing-1.2.0/itn/english/rules/telephone.py +123 -0
  87. wetextprocessing-1.2.0/itn/english/rules/time.py +123 -0
  88. wetextprocessing-1.2.0/itn/english/rules/whitelist.py +32 -0
  89. wetextprocessing-1.2.0/itn/english/rules/word.py +31 -0
  90. wetextprocessing-1.2.0/itn/english/test/data/en_cardinal.txt +28 -0
  91. wetextprocessing-1.2.0/itn/english/test/data/en_date.txt +44 -0
  92. wetextprocessing-1.2.0/itn/english/test/data/en_decimal.txt +63 -0
  93. wetextprocessing-1.2.0/itn/english/test/data/en_electronic.txt +25 -0
  94. wetextprocessing-1.2.0/itn/english/test/data/en_measure.txt +114 -0
  95. wetextprocessing-1.2.0/itn/english/test/data/en_money.txt +52 -0
  96. wetextprocessing-1.2.0/itn/english/test/data/en_ordinal.txt +34 -0
  97. wetextprocessing-1.2.0/itn/english/test/data/en_telephone.txt +24 -0
  98. wetextprocessing-1.2.0/itn/english/test/data/en_time.txt +36 -0
  99. wetextprocessing-1.2.0/itn/english/test/data/en_whitelist.txt +12 -0
  100. wetextprocessing-1.2.0/itn/english/test/data/en_word.txt +55 -0
  101. wetextprocessing-1.2.0/itn/english/test/normalizer_test.py +43 -0
  102. {WeTextProcessing-1.0.4.1/tn → wetextprocessing-1.2.0/itn}/english/test/utils.py +3 -3
  103. wetextprocessing-1.2.0/itn/japanese/data/char/common_chinese_char.tsv +2502 -0
  104. wetextprocessing-1.2.0/itn/japanese/data/char/hiragana_and_katakana.tsv +160 -0
  105. wetextprocessing-1.2.0/itn/japanese/data/char/oov_tags.tsv +1 -0
  106. wetextprocessing-1.2.0/itn/japanese/data/char/punctuations_ja.tsv +72 -0
  107. wetextprocessing-1.2.0/itn/japanese/data/date/day.tsv +31 -0
  108. wetextprocessing-1.2.0/itn/japanese/data/date/month.tsv +12 -0
  109. wetextprocessing-1.2.0/itn/japanese/data/date/week.tsv +14 -0
  110. wetextprocessing-1.2.0/itn/japanese/data/default/whitelist.tsv +23 -0
  111. wetextprocessing-1.2.0/itn/japanese/data/math/operator.tsv +8 -0
  112. wetextprocessing-1.2.0/itn/japanese/data/measure/unit_en.tsv +123 -0
  113. wetextprocessing-1.2.0/itn/japanese/data/measure/unit_ja.tsv +48 -0
  114. wetextprocessing-1.2.0/itn/japanese/data/money/symbol.tsv +9 -0
  115. wetextprocessing-1.2.0/itn/japanese/data/number/digit.tsv +9 -0
  116. wetextprocessing-1.2.0/itn/japanese/data/number/dot.tsv +1 -0
  117. wetextprocessing-1.2.0/itn/japanese/data/number/hundred.tsv +1 -0
  118. wetextprocessing-1.2.0/itn/japanese/data/number/hundred_digit.tsv +9 -0
  119. wetextprocessing-1.2.0/itn/japanese/data/number/sign.tsv +4 -0
  120. wetextprocessing-1.2.0/itn/japanese/data/number/teen.tsv +10 -0
  121. wetextprocessing-1.2.0/itn/japanese/data/number/thousands.tsv +9 -0
  122. wetextprocessing-1.2.0/itn/japanese/data/number/ties.tsv +8 -0
  123. wetextprocessing-1.2.0/itn/japanese/data/number/zero.tsv +4 -0
  124. wetextprocessing-1.2.0/itn/japanese/data/time/hour.tsv +34 -0
  125. wetextprocessing-1.2.0/itn/japanese/data/time/minute.tsv +60 -0
  126. wetextprocessing-1.2.0/itn/japanese/data/time/second.tsv +60 -0
  127. wetextprocessing-1.2.0/itn/japanese/inverse_normalizer.py +96 -0
  128. wetextprocessing-1.2.0/itn/japanese/rules/cardinal.py +158 -0
  129. wetextprocessing-1.2.0/itn/japanese/rules/char.py +29 -0
  130. wetextprocessing-1.2.0/itn/japanese/rules/date.py +71 -0
  131. wetextprocessing-1.2.0/itn/japanese/rules/fraction.py +64 -0
  132. wetextprocessing-1.2.0/itn/japanese/rules/math.py +39 -0
  133. wetextprocessing-1.2.0/itn/japanese/rules/measure.py +48 -0
  134. wetextprocessing-1.2.0/itn/japanese/rules/money.py +45 -0
  135. wetextprocessing-1.2.0/itn/japanese/rules/ordinal.py +34 -0
  136. wetextprocessing-1.2.0/itn/japanese/rules/postprocessor.py +46 -0
  137. wetextprocessing-1.2.0/itn/japanese/rules/preprocessor.py +31 -0
  138. wetextprocessing-1.2.0/itn/japanese/rules/time.py +53 -0
  139. wetextprocessing-1.2.0/itn/japanese/rules/whitelist.py +33 -0
  140. wetextprocessing-1.2.0/itn/japanese/test/data/cardinal.txt +57 -0
  141. wetextprocessing-1.2.0/itn/japanese/test/data/char.txt +2 -0
  142. wetextprocessing-1.2.0/itn/japanese/test/data/date.txt +13 -0
  143. wetextprocessing-1.2.0/itn/japanese/test/data/fraction.txt +8 -0
  144. wetextprocessing-1.2.0/itn/japanese/test/data/math.txt +6 -0
  145. wetextprocessing-1.2.0/itn/japanese/test/data/measure.txt +6 -0
  146. wetextprocessing-1.2.0/itn/japanese/test/data/money.txt +1 -0
  147. wetextprocessing-1.2.0/itn/japanese/test/data/normalizer_disable_standalone_number_disable_0_to_9.txt +72 -0
  148. wetextprocessing-1.2.0/itn/japanese/test/data/normalizer_disable_standalone_number_enable_0_to_9.txt +72 -0
  149. wetextprocessing-1.2.0/itn/japanese/test/data/normalizer_enable_standalone_number_disable_0_to_9.txt +70 -0
  150. wetextprocessing-1.2.0/itn/japanese/test/data/number.txt +11 -0
  151. wetextprocessing-1.2.0/itn/japanese/test/data/time.txt +9 -0
  152. wetextprocessing-1.2.0/itn/japanese/test/data/whitelist.txt +2 -0
  153. wetextprocessing-1.2.0/itn/japanese/test/normalizer_test.py +113 -0
  154. {WeTextProcessing-1.0.4.1/itn/chinese → wetextprocessing-1.2.0/itn/japanese}/test/utils.py +3 -3
  155. wetextprocessing-1.2.0/itn/main.py +62 -0
  156. wetextprocessing-1.2.0/itn/zh_itn_tagger.fst +0 -0
  157. wetextprocessing-1.2.0/itn/zh_itn_verbalizer.fst +0 -0
  158. wetextprocessing-1.2.0/pyproject.toml +57 -0
  159. wetextprocessing-1.2.0/runtime/CMakeLists.txt +38 -0
  160. wetextprocessing-1.2.0/runtime/README.md +28 -0
  161. wetextprocessing-1.2.0/runtime/android/.gitignore +15 -0
  162. wetextprocessing-1.2.0/runtime/android/app/.gitignore +2 -0
  163. wetextprocessing-1.2.0/runtime/android/app/build.gradle +105 -0
  164. wetextprocessing-1.2.0/runtime/android/app/proguard-rules.pro +21 -0
  165. wetextprocessing-1.2.0/runtime/android/app/src/androidTest/java/com/mobvoi/WeTextProcessing/ExampleInstrumentedTest.java +26 -0
  166. wetextprocessing-1.2.0/runtime/android/app/src/main/AndroidManifest.xml +22 -0
  167. wetextprocessing-1.2.0/runtime/android/app/src/main/assets/README.md +1 -0
  168. wetextprocessing-1.2.0/runtime/android/app/src/main/cpp/CMakeLists.txt +22 -0
  169. wetextprocessing-1.2.0/runtime/android/app/src/main/cpp/wetextprocessing.cc +80 -0
  170. wetextprocessing-1.2.0/runtime/android/app/src/main/java/com/mobvoi/WeTextProcessing/MainActivity.java +78 -0
  171. wetextprocessing-1.2.0/runtime/android/app/src/main/java/com/mobvoi/WeTextProcessing/WeTextProcessing.java +12 -0
  172. wetextprocessing-1.2.0/runtime/android/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
  173. wetextprocessing-1.2.0/runtime/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +30 -0
  174. wetextprocessing-1.2.0/runtime/android/app/src/main/res/layout/activity_main.xml +59 -0
  175. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
  176. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
  177. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  178. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  179. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  180. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  181. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  182. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  183. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  184. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  185. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  186. wetextprocessing-1.2.0/runtime/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  187. wetextprocessing-1.2.0/runtime/android/app/src/main/res/values/attrs.xml +17 -0
  188. wetextprocessing-1.2.0/runtime/android/app/src/main/res/values/colors.xml +16 -0
  189. wetextprocessing-1.2.0/runtime/android/app/src/main/res/values/strings.xml +3 -0
  190. wetextprocessing-1.2.0/runtime/android/app/src/main/res/values/themes.xml +16 -0
  191. wetextprocessing-1.2.0/runtime/android/app/src/main/res/values-night/themes.xml +16 -0
  192. wetextprocessing-1.2.0/runtime/android/app/src/test/java/com/mobvoi/WeTextProcessing/ExampleUnitTest.java +17 -0
  193. wetextprocessing-1.2.0/runtime/android/app/wenet.keystore +0 -0
  194. wetextprocessing-1.2.0/runtime/android/build.gradle +21 -0
  195. wetextprocessing-1.2.0/runtime/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  196. wetextprocessing-1.2.0/runtime/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  197. wetextprocessing-1.2.0/runtime/android/gradle.properties +19 -0
  198. wetextprocessing-1.2.0/runtime/android/gradlew +234 -0
  199. wetextprocessing-1.2.0/runtime/android/gradlew.bat +89 -0
  200. wetextprocessing-1.2.0/runtime/android/settings.gradle +2 -0
  201. wetextprocessing-1.2.0/runtime/bin/CMakeLists.txt +3 -0
  202. wetextprocessing-1.2.0/runtime/bin/processor_main.cc +57 -0
  203. wetextprocessing-1.2.0/runtime/cmake/gflags.cmake +8 -0
  204. wetextprocessing-1.2.0/runtime/cmake/glog.cmake +6 -0
  205. wetextprocessing-1.2.0/runtime/cmake/gtest.cmake +8 -0
  206. wetextprocessing-1.2.0/runtime/cmake/openfst.cmake +43 -0
  207. wetextprocessing-1.2.0/runtime/patch/CPPLINT.cfg +1 -0
  208. wetextprocessing-1.2.0/runtime/patch/openfst/src/CMakeLists.txt +23 -0
  209. wetextprocessing-1.2.0/runtime/patch/openfst/src/extensions/special/CMakeLists.txt +67 -0
  210. wetextprocessing-1.2.0/runtime/patch/openfst/src/include/fst/flags.h +219 -0
  211. wetextprocessing-1.2.0/runtime/patch/openfst/src/include/fst/log.h +78 -0
  212. wetextprocessing-1.2.0/runtime/patch/openfst/src/lib/flags.cc +160 -0
  213. wetextprocessing-1.2.0/runtime/patch/openfst/src/test/CMakeLists.txt +55 -0
  214. wetextprocessing-1.2.0/runtime/processor/CMakeLists.txt +22 -0
  215. wetextprocessing-1.2.0/runtime/processor/wetext_processor.cc +81 -0
  216. wetextprocessing-1.2.0/runtime/processor/wetext_processor.h +51 -0
  217. wetextprocessing-1.2.0/runtime/processor/wetext_processor_c_api.cc +64 -0
  218. wetextprocessing-1.2.0/runtime/processor/wetext_processor_c_api.h +46 -0
  219. wetextprocessing-1.2.0/runtime/processor/wetext_token_parser.cc +167 -0
  220. wetextprocessing-1.2.0/runtime/processor/wetext_token_parser.h +96 -0
  221. wetextprocessing-1.2.0/runtime/test/CMakeLists.txt +18 -0
  222. wetextprocessing-1.2.0/runtime/test/processor_test.cc +72 -0
  223. wetextprocessing-1.2.0/runtime/test/string_test.cc +45 -0
  224. wetextprocessing-1.2.0/runtime/test/token_parser_test.cc +103 -0
  225. wetextprocessing-1.2.0/runtime/utils/CMakeLists.txt +3 -0
  226. wetextprocessing-1.2.0/runtime/utils/wetext_flags.h +23 -0
  227. wetextprocessing-1.2.0/runtime/utils/wetext_log.h +23 -0
  228. wetextprocessing-1.2.0/runtime/utils/wetext_string.cc +89 -0
  229. wetextprocessing-1.2.0/runtime/utils/wetext_string.h +42 -0
  230. wetextprocessing-1.2.0/tn/README.md +69 -0
  231. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/__main__.py +1 -1
  232. wetextprocessing-1.2.0/tn/_version.py +34 -0
  233. wetextprocessing-1.2.0/tn/chinese/data/cardinal/phone.tsv +28 -0
  234. wetextprocessing-1.2.0/tn/chinese/data/char/fullwidth_to_halfwidth.tsv +95 -0
  235. wetextprocessing-1.2.0/tn/chinese/data/math/operator_unambiguous.tsv +6 -0
  236. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/measure/units_en.tsv +1 -0
  237. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/measure/units_zh.tsv +1 -0
  238. wetextprocessing-1.2.0/tn/chinese/normalizer.py +104 -0
  239. wetextprocessing-1.2.0/tn/chinese/rules/cardinal.py +102 -0
  240. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/rules/char.py +3 -3
  241. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/rules/date.py +21 -19
  242. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/rules/fraction.py +19 -11
  243. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/rules/math.py +10 -14
  244. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/rules/measure.py +27 -30
  245. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/rules/money.py +19 -11
  246. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/rules/postprocessor.py +14 -25
  247. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/rules/preprocessor.py +5 -6
  248. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/rules/sport.py +14 -14
  249. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/rules/time.py +23 -16
  250. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/rules/whitelist.py +9 -10
  251. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/cardinal_test.py +2 -2
  252. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/char_test.py +1 -1
  253. wetextprocessing-1.2.0/tn/chinese/test/data/cardinal.txt +7 -0
  254. wetextprocessing-1.2.0/tn/chinese/test/data/char.txt +2 -0
  255. wetextprocessing-1.2.0/tn/chinese/test/data/date.txt +14 -0
  256. wetextprocessing-1.2.0/tn/chinese/test/data/fraction.txt +3 -0
  257. wetextprocessing-1.2.0/tn/chinese/test/data/math.txt +8 -0
  258. wetextprocessing-1.2.0/tn/chinese/test/data/measure.txt +10 -0
  259. wetextprocessing-1.2.0/tn/chinese/test/data/money.txt +3 -0
  260. wetextprocessing-1.2.0/tn/chinese/test/data/normalizer.txt +48 -0
  261. wetextprocessing-1.2.0/tn/chinese/test/data/number.txt +27 -0
  262. wetextprocessing-1.2.0/tn/chinese/test/data/postprocessor.txt +5 -0
  263. wetextprocessing-1.2.0/tn/chinese/test/data/preprocessor.txt +1 -0
  264. wetextprocessing-1.2.0/tn/chinese/test/data/sport.txt +3 -0
  265. wetextprocessing-1.2.0/tn/chinese/test/data/time.txt +6 -0
  266. wetextprocessing-1.2.0/tn/chinese/test/data/whitelist.txt +4 -0
  267. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/date_test.py +1 -1
  268. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/fraction_test.py +1 -1
  269. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/math_test.py +1 -1
  270. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/measure_test.py +1 -1
  271. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/money_test.py +1 -1
  272. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/normalizer_test.py +13 -11
  273. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/postprocessor_test.py +1 -1
  274. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/preprocessor_test.py +1 -1
  275. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/sport_test.py +1 -1
  276. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/time_test.py +1 -1
  277. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/token_parser_test.py +22 -22
  278. wetextprocessing-1.2.0/tn/chinese/test/utils.py +32 -0
  279. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/whitelist_test.py +1 -1
  280. wetextprocessing-1.2.0/tn/en_tn_tagger.fst +0 -0
  281. wetextprocessing-1.2.0/tn/en_tn_verbalizer.fst +0 -0
  282. wetextprocessing-1.2.0/tn/english/data/money/__init__.py +0 -0
  283. wetextprocessing-1.2.0/tn/english/data/number/zero.tsv +1 -0
  284. wetextprocessing-1.2.0/tn/english/data/ordinal/__init__.py +0 -0
  285. wetextprocessing-1.2.0/tn/english/data/ordinal/teen.tsv +1 -0
  286. wetextprocessing-1.2.0/tn/english/data/roman/README.md +20 -0
  287. wetextprocessing-1.2.0/tn/english/data/roman/__init__.py +0 -0
  288. wetextprocessing-1.2.0/tn/english/data/telephone/__init__.py +0 -0
  289. wetextprocessing-1.2.0/tn/english/data/whitelist/__init__.py +0 -0
  290. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/whitelist/tts.tsv +0 -19
  291. wetextprocessing-1.2.0/tn/english/normalizer.py +98 -0
  292. wetextprocessing-1.2.0/tn/english/rules/__init__.py +0 -0
  293. wetextprocessing-1.2.0/tn/english/rules/cardinal.py +173 -0
  294. wetextprocessing-1.2.0/tn/english/rules/date.py +352 -0
  295. wetextprocessing-1.2.0/tn/english/rules/decimal.py +192 -0
  296. wetextprocessing-1.2.0/tn/english/rules/electronic.py +199 -0
  297. wetextprocessing-1.2.0/tn/english/rules/fraction.py +122 -0
  298. wetextprocessing-1.2.0/tn/english/rules/measure.py +354 -0
  299. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/rules/money.py +34 -44
  300. wetextprocessing-1.2.0/tn/english/rules/ordinal.py +91 -0
  301. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/rules/punctuation.py +25 -32
  302. wetextprocessing-1.2.0/tn/english/rules/range.py +131 -0
  303. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/rules/roman.py +52 -42
  304. wetextprocessing-1.2.0/tn/english/rules/serial.py +106 -0
  305. wetextprocessing-1.2.0/tn/english/rules/telephone.py +165 -0
  306. wetextprocessing-1.2.0/tn/english/rules/time.py +188 -0
  307. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/rules/whitelist.py +30 -43
  308. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/rules/word.py +8 -15
  309. wetextprocessing-1.2.0/tn/english/test/__init__.py +0 -0
  310. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/cardinal_test.py +1 -1
  311. wetextprocessing-1.2.0/tn/english/test/data/cardinal.txt +27 -0
  312. wetextprocessing-1.2.0/tn/english/test/data/date.txt +14 -0
  313. wetextprocessing-1.2.0/tn/english/test/data/decimal.txt +3 -0
  314. wetextprocessing-1.2.0/tn/english/test/data/electronic.txt +1 -0
  315. wetextprocessing-1.2.0/tn/english/test/data/fraction.txt +7 -0
  316. wetextprocessing-1.2.0/tn/english/test/data/measure.txt +7 -0
  317. wetextprocessing-1.2.0/tn/english/test/data/money.txt +8 -0
  318. wetextprocessing-1.2.0/tn/english/test/data/normalizer.txt +8 -0
  319. wetextprocessing-1.2.0/tn/english/test/data/ordinal.txt +11 -0
  320. wetextprocessing-1.2.0/tn/english/test/data/range.txt +1 -0
  321. wetextprocessing-1.2.0/tn/english/test/data/roman.txt +1 -0
  322. wetextprocessing-1.2.0/tn/english/test/data/telephone.txt +2 -0
  323. wetextprocessing-1.2.0/tn/english/test/data/time.txt +9 -0
  324. wetextprocessing-1.2.0/tn/english/test/data/whitelist.txt +6 -0
  325. wetextprocessing-1.2.0/tn/english/test/data/word.txt +6 -0
  326. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/date_test.py +1 -1
  327. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/decimal_test.py +1 -1
  328. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/electronic_test.py +1 -1
  329. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/fraction_test.py +1 -1
  330. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/measure_test.py +1 -1
  331. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/money_test.py +1 -1
  332. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/normalizer_test.py +1 -1
  333. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/ordinal_test.py +1 -1
  334. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/range_test.py +1 -1
  335. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/roman_test.py +1 -1
  336. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/telephone_test.py +1 -1
  337. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/time_test.py +1 -1
  338. wetextprocessing-1.2.0/tn/english/test/utils.py +32 -0
  339. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/whitelist_test.py +1 -1
  340. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/test/word_test.py +1 -1
  341. wetextprocessing-1.2.0/tn/japanese/__init__.py +0 -0
  342. wetextprocessing-1.2.0/tn/japanese/data/char/common_chinese_char.tsv +2502 -0
  343. wetextprocessing-1.2.0/tn/japanese/data/char/fullwidth_to_halfwidth.tsv +95 -0
  344. wetextprocessing-1.2.0/tn/japanese/data/char/hiragana_and_katakana.tsv +160 -0
  345. wetextprocessing-1.2.0/tn/japanese/data/char/oov_tags.tsv +1 -0
  346. wetextprocessing-1.2.0/tn/japanese/data/char/punctuations_ja.tsv +72 -0
  347. wetextprocessing-1.2.0/tn/japanese/data/date/d.tsv +31 -0
  348. wetextprocessing-1.2.0/tn/japanese/data/date/date.tsv +7 -0
  349. wetextprocessing-1.2.0/tn/japanese/data/date/dd.tsv +9 -0
  350. wetextprocessing-1.2.0/tn/japanese/data/date/m.tsv +12 -0
  351. wetextprocessing-1.2.0/tn/japanese/data/date/mm.tsv +9 -0
  352. wetextprocessing-1.2.0/tn/japanese/data/default/blacklist.tsv +0 -0
  353. wetextprocessing-1.2.0/tn/japanese/data/default/whitelist.tsv +14 -0
  354. wetextprocessing-1.2.0/tn/japanese/data/math/operator.tsv +12 -0
  355. wetextprocessing-1.2.0/tn/japanese/data/measure/units_en.tsv +101 -0
  356. wetextprocessing-1.2.0/tn/japanese/data/measure/units_ja.tsv +45 -0
  357. wetextprocessing-1.2.0/tn/japanese/data/money/code.tsv +24 -0
  358. wetextprocessing-1.2.0/tn/japanese/data/money/symbol.tsv +11 -0
  359. wetextprocessing-1.2.0/tn/japanese/data/number/digit.tsv +18 -0
  360. wetextprocessing-1.2.0/tn/japanese/data/number/dot.tsv +1 -0
  361. wetextprocessing-1.2.0/tn/japanese/data/number/en_digit.tsv +18 -0
  362. wetextprocessing-1.2.0/tn/japanese/data/number/sign.tsv +3 -0
  363. wetextprocessing-1.2.0/tn/japanese/data/number/teen.tsv +18 -0
  364. wetextprocessing-1.2.0/tn/japanese/data/number/zero.tsv +2 -0
  365. wetextprocessing-1.2.0/tn/japanese/data/pyopenjtalk/transliteration.tsv +6791 -0
  366. wetextprocessing-1.2.0/tn/japanese/data/sport/club.tsv +31 -0
  367. wetextprocessing-1.2.0/tn/japanese/data/sport/country.tsv +185 -0
  368. wetextprocessing-1.2.0/tn/japanese/data/time/hour.tsv +35 -0
  369. wetextprocessing-1.2.0/tn/japanese/data/time/minute.tsv +60 -0
  370. wetextprocessing-1.2.0/tn/japanese/data/time/noon.tsv +10 -0
  371. wetextprocessing-1.2.0/tn/japanese/data/time/second.tsv +60 -0
  372. wetextprocessing-1.2.0/tn/japanese/normalizer.py +105 -0
  373. wetextprocessing-1.2.0/tn/japanese/rules/cardinal.py +132 -0
  374. wetextprocessing-1.2.0/tn/japanese/rules/char.py +29 -0
  375. wetextprocessing-1.2.0/tn/japanese/rules/date.py +67 -0
  376. wetextprocessing-1.2.0/tn/japanese/rules/fraction.py +49 -0
  377. wetextprocessing-1.2.0/tn/japanese/rules/math.py +37 -0
  378. wetextprocessing-1.2.0/tn/japanese/rules/measure.py +48 -0
  379. wetextprocessing-1.2.0/tn/japanese/rules/money.py +51 -0
  380. wetextprocessing-1.2.0/tn/japanese/rules/postprocessor.py +46 -0
  381. wetextprocessing-1.2.0/tn/japanese/rules/preprocessor.py +31 -0
  382. wetextprocessing-1.2.0/tn/japanese/rules/sport.py +50 -0
  383. wetextprocessing-1.2.0/tn/japanese/rules/time.py +54 -0
  384. wetextprocessing-1.2.0/tn/japanese/rules/transliteration.py +33 -0
  385. wetextprocessing-1.2.0/tn/japanese/rules/whitelist.py +36 -0
  386. wetextprocessing-1.2.0/tn/japanese/test/__init__.py +0 -0
  387. wetextprocessing-1.2.0/tn/japanese/test/data/cardinal.txt +41 -0
  388. wetextprocessing-1.2.0/tn/japanese/test/data/char.txt +2 -0
  389. wetextprocessing-1.2.0/tn/japanese/test/data/date.txt +28 -0
  390. wetextprocessing-1.2.0/tn/japanese/test/data/fraction.txt +3 -0
  391. wetextprocessing-1.2.0/tn/japanese/test/data/math.txt +26 -0
  392. wetextprocessing-1.2.0/tn/japanese/test/data/measure.txt +11 -0
  393. wetextprocessing-1.2.0/tn/japanese/test/data/money.txt +7 -0
  394. wetextprocessing-1.2.0/tn/japanese/test/data/sport.txt +9 -0
  395. wetextprocessing-1.2.0/tn/japanese/test/data/time.txt +10 -0
  396. wetextprocessing-1.2.0/tn/japanese/test/data/whitelist.txt +4 -0
  397. wetextprocessing-1.2.0/tn/japanese/test/normalizer_test.py +42 -0
  398. wetextprocessing-1.2.0/tn/japanese/test/utils.py +32 -0
  399. wetextprocessing-1.2.0/tn/main.py +73 -0
  400. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/processor.py +45 -40
  401. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/token_parser.py +28 -27
  402. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/utils.py +16 -14
  403. wetextprocessing-1.2.0/tn/zh_tn_tagger.fst +0 -0
  404. wetextprocessing-1.2.0/tn/zh_tn_verbalizer.fst +0 -0
  405. WeTextProcessing-1.0.4.1/WeTextProcessing.egg-info/SOURCES.txt +0 -216
  406. WeTextProcessing-1.0.4.1/WeTextProcessing.egg-info/requires.txt +0 -2
  407. WeTextProcessing-1.0.4.1/itn/chinese/inverse_normalizer.py +0 -82
  408. WeTextProcessing-1.0.4.1/itn/chinese/rules/cardinal.py +0 -165
  409. WeTextProcessing-1.0.4.1/itn/chinese/rules/measure.py +0 -103
  410. WeTextProcessing-1.0.4.1/itn/chinese/test/normalizer_test.py +0 -109
  411. WeTextProcessing-1.0.4.1/itn/main.py +0 -74
  412. WeTextProcessing-1.0.4.1/itn/zh_itn_tagger.fst +0 -0
  413. WeTextProcessing-1.0.4.1/itn/zh_itn_verbalizer.fst +0 -0
  414. WeTextProcessing-1.0.4.1/setup.py +0 -54
  415. WeTextProcessing-1.0.4.1/tn/chinese/normalizer.py +0 -96
  416. WeTextProcessing-1.0.4.1/tn/chinese/rules/cardinal.py +0 -86
  417. WeTextProcessing-1.0.4.1/tn/en_tn_tagger.fst +0 -0
  418. WeTextProcessing-1.0.4.1/tn/en_tn_verbalizer.fst +0 -0
  419. WeTextProcessing-1.0.4.1/tn/english/normalizer.py +0 -112
  420. WeTextProcessing-1.0.4.1/tn/english/rules/cardinal.py +0 -186
  421. WeTextProcessing-1.0.4.1/tn/english/rules/date.py +0 -319
  422. WeTextProcessing-1.0.4.1/tn/english/rules/decimal.py +0 -194
  423. WeTextProcessing-1.0.4.1/tn/english/rules/electronic.py +0 -213
  424. WeTextProcessing-1.0.4.1/tn/english/rules/fraction.py +0 -139
  425. WeTextProcessing-1.0.4.1/tn/english/rules/measure.py +0 -327
  426. WeTextProcessing-1.0.4.1/tn/english/rules/ordinal.py +0 -96
  427. WeTextProcessing-1.0.4.1/tn/english/rules/range.py +0 -138
  428. WeTextProcessing-1.0.4.1/tn/english/rules/telephone.py +0 -180
  429. WeTextProcessing-1.0.4.1/tn/english/rules/time.py +0 -167
  430. WeTextProcessing-1.0.4.1/tn/main.py +0 -90
  431. WeTextProcessing-1.0.4.1/tn/zh_tn_tagger.fst +0 -0
  432. WeTextProcessing-1.0.4.1/tn/zh_tn_verbalizer.fst +0 -0
  433. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/LICENSE +0 -0
  434. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/README.md +0 -0
  435. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/WeTextProcessing.egg-info/dependency_links.txt +0 -0
  436. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/WeTextProcessing.egg-info/top_level.txt +0 -0
  437. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/__init__.py +0 -0
  438. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/__init__.py +0 -0
  439. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/date/dd.tsv +0 -0
  440. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/date/mm.tsv +0 -0
  441. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/default/blacklist.tsv +0 -0
  442. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/default/whitelist.tsv +0 -0
  443. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/license_plate/province.tsv +0 -0
  444. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/math/operator.tsv +0 -0
  445. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/measure/units_en.tsv +0 -0
  446. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/measure/units_zh.tsv +0 -0
  447. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/money/code.tsv +0 -0
  448. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/money/symbol.tsv +0 -0
  449. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/number/digit.tsv +0 -0
  450. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/number/digit_zh.tsv +0 -0
  451. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/number/dot.tsv +0 -0
  452. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/number/sign.tsv +0 -0
  453. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/number/special_dash.tsv +0 -0
  454. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/number/special_tilde.tsv +0 -0
  455. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/number/zero.tsv +0 -0
  456. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/time/hour.tsv +0 -0
  457. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/time/noon.tsv +0 -0
  458. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/data/time/second.tsv +0 -0
  459. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/rules/__init__.py +0 -0
  460. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/itn/chinese/test/__init__.py +0 -0
  461. {WeTextProcessing-1.0.4.1/tn → wetextprocessing-1.2.0/itn/english}/__init__.py +0 -0
  462. {WeTextProcessing-1.0.4.1/tn/english/data/number → wetextprocessing-1.2.0/itn/english/data/numbers}/zero.tsv +0 -0
  463. {WeTextProcessing-1.0.4.1/tn/english/data/ordinal → wetextprocessing-1.2.0/itn/english/data/ordinals}/teen.tsv +0 -0
  464. {WeTextProcessing-1.0.4.1/tn/chinese → wetextprocessing-1.2.0/itn/english/rules}/__init__.py +0 -0
  465. {WeTextProcessing-1.0.4.1/tn/chinese/rules → wetextprocessing-1.2.0/itn/english/test}/__init__.py +0 -0
  466. {WeTextProcessing-1.0.4.1/tn/english → wetextprocessing-1.2.0/itn/japanese}/__init__.py +0 -0
  467. {WeTextProcessing-1.0.4.1/tn/chinese → wetextprocessing-1.2.0/itn/japanese}/data/char/fullwidth_to_halfwidth.tsv +0 -0
  468. /WeTextProcessing-1.0.4.1/tn/english/data/__init__.py → /wetextprocessing-1.2.0/itn/japanese/data/default/blacklist.tsv +0 -0
  469. {WeTextProcessing-1.0.4.1/tn/english/data/date → wetextprocessing-1.2.0/itn/japanese/rules}/__init__.py +0 -0
  470. {WeTextProcessing-1.0.4.1/tn/english/data/electronic → wetextprocessing-1.2.0/itn/japanese/test}/__init__.py +0 -0
  471. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/setup.cfg +0 -0
  472. {WeTextProcessing-1.0.4.1/tn/english/data/money → wetextprocessing-1.2.0/tn}/__init__.py +0 -0
  473. {WeTextProcessing-1.0.4.1/tn/english/data/ordinal → wetextprocessing-1.2.0/tn/chinese}/__init__.py +0 -0
  474. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/char/charset_extension.tsv +0 -0
  475. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/char/charset_national_standard_2013_8105.tsv +0 -0
  476. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/char/punctuations_zh.tsv +0 -0
  477. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/char/traditional_to_simple.tsv +0 -0
  478. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/date/d.tsv +0 -0
  479. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/date/dd.tsv +0 -0
  480. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/date/m.tsv +0 -0
  481. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/date/mm.tsv +0 -0
  482. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/default/blacklist.tsv +0 -0
  483. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/default/whitelist.tsv +0 -0
  484. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/erhua/whitelist.tsv +0 -0
  485. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/math/operator.tsv +0 -0
  486. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/money/code.tsv +0 -0
  487. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/money/symbol.tsv +0 -0
  488. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/number/digit.tsv +0 -0
  489. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/number/dot.tsv +0 -0
  490. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/number/sign.tsv +0 -0
  491. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/number/teen.tsv +0 -0
  492. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/number/zero.tsv +0 -0
  493. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/sport/club.tsv +0 -0
  494. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/sport/country.tsv +0 -0
  495. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/time/hour.tsv +0 -0
  496. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/time/minute.tsv +0 -0
  497. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/time/noon.tsv +0 -0
  498. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/data/time/second.tsv +0 -0
  499. {WeTextProcessing-1.0.4.1/tn/english/data/roman → wetextprocessing-1.2.0/tn/chinese/rules}/__init__.py +0 -0
  500. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/chinese/test/__init__.py +0 -0
  501. {WeTextProcessing-1.0.4.1/tn/english/data/telephone → wetextprocessing-1.2.0/tn/english}/__init__.py +0 -0
  502. {WeTextProcessing-1.0.4.1/tn/english/data/whitelist → wetextprocessing-1.2.0/tn/english/data}/__init__.py +0 -0
  503. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/address/__init__.py +0 -0
  504. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/address/address_word.tsv +0 -0
  505. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/address/state.tsv +0 -0
  506. {WeTextProcessing-1.0.4.1/tn/english/rules → wetextprocessing-1.2.0/tn/english/data/date}/__init__.py +0 -0
  507. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/date/day.tsv +0 -0
  508. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/date/month_abbr.tsv +0 -0
  509. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/date/month_name.tsv +0 -0
  510. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/date/month_number.tsv +0 -0
  511. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/date/week.tsv +0 -0
  512. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/date/year_suffix.tsv +0 -0
  513. {WeTextProcessing-1.0.4.1/tn/english/test → wetextprocessing-1.2.0/tn/english/data/electronic}/__init__.py +0 -0
  514. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/electronic/domain.tsv +0 -0
  515. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/electronic/symbol.tsv +0 -0
  516. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/electronic/words.tsv +0 -0
  517. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/measure/__init__.py +0 -0
  518. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/measure/math_operation.tsv +0 -0
  519. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/measure/unit.tsv +0 -0
  520. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/measure/unit_alternatives.tsv +0 -0
  521. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/money/currency_major.tsv +0 -0
  522. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/money/currency_minor_plural.tsv +0 -0
  523. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/money/currency_minor_singular.tsv +0 -0
  524. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/money/per_unit.tsv +0 -0
  525. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/number/__init__.py +0 -0
  526. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/number/cardinal_number_name.far +0 -0
  527. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/number/cardinal_number_name_au.far +0 -0
  528. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/number/digit.tsv +0 -0
  529. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/number/fraction.tsv +0 -0
  530. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/number/hundred.tsv +0 -0
  531. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/number/quantity_abbr.tsv +0 -0
  532. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/number/teen.tsv +0 -0
  533. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/number/thousand.tsv +0 -0
  534. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/number/ty.tsv +0 -0
  535. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/ordinal/digit.tsv +0 -0
  536. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/roman/female.tsv +0 -0
  537. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/roman/key_word.tsv +0 -0
  538. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/roman/male.tsv +0 -0
  539. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/roman/roman_to_spoken.tsv +0 -0
  540. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/suppletive.tsv +0 -0
  541. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/telephone/ip_prompt.tsv +0 -0
  542. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/telephone/ssn_prompt.tsv +0 -0
  543. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/telephone/telephone_prompt.tsv +0 -0
  544. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/time/__init__.py +0 -0
  545. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/time/suffix.tsv +0 -0
  546. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/time/zone.tsv +0 -0
  547. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/whitelist/alternatives.tsv +0 -0
  548. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/whitelist/alternatives_all_format.tsv +0 -0
  549. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/whitelist/asr.tsv +0 -0
  550. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/whitelist/asr_with_pc.tsv +0 -0
  551. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/whitelist/ipa_symbols.tsv +0 -0
  552. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/whitelist/lj_speech.tsv +0 -0
  553. {WeTextProcessing-1.0.4.1 → wetextprocessing-1.2.0}/tn/english/data/whitelist/symbol.tsv +0 -0
@@ -0,0 +1,93 @@
1
+ ---
2
+ Language: Cpp
3
+ # BasedOnStyle: Google
4
+ AccessModifierOffset: -1
5
+ AlignAfterOpenBracket: Align
6
+ AlignConsecutiveAssignments: false
7
+ AlignConsecutiveDeclarations: false
8
+ AlignEscapedNewlinesLeft: true
9
+ AlignOperands: true
10
+ AlignTrailingComments: true
11
+ AllowAllParametersOfDeclarationOnNextLine: true
12
+ AllowShortBlocksOnASingleLine: false
13
+ AllowShortCaseLabelsOnASingleLine: false
14
+ AllowShortFunctionsOnASingleLine: All
15
+ AllowShortIfStatementsOnASingleLine: true
16
+ AllowShortLoopsOnASingleLine: true
17
+ AlwaysBreakAfterDefinitionReturnType: None
18
+ AlwaysBreakAfterReturnType: None
19
+ AlwaysBreakBeforeMultilineStrings: true
20
+ AlwaysBreakTemplateDeclarations: true
21
+ BinPackArguments: true
22
+ BinPackParameters: true
23
+ BraceWrapping:
24
+ AfterClass: false
25
+ AfterControlStatement: false
26
+ AfterEnum: false
27
+ AfterFunction: false
28
+ AfterNamespace: false
29
+ AfterObjCDeclaration: false
30
+ AfterStruct: false
31
+ AfterUnion: false
32
+ BeforeCatch: false
33
+ BeforeElse: false
34
+ IndentBraces: false
35
+ BreakBeforeBinaryOperators: None
36
+ BreakBeforeBraces: Attach
37
+ BreakBeforeTernaryOperators: true
38
+ BreakConstructorInitializersBeforeComma: false
39
+ BreakAfterJavaFieldAnnotations: false
40
+ BreakStringLiterals: true
41
+ ColumnLimit: 80
42
+ CommentPragmas: '^ IWYU pragma:'
43
+ ConstructorInitializerAllOnOneLineOrOnePerLine: true
44
+ ConstructorInitializerIndentWidth: 4
45
+ ContinuationIndentWidth: 4
46
+ Cpp11BracedListStyle: true
47
+ DisableFormat: false
48
+ ExperimentalAutoDetectBinPacking: false
49
+ ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
50
+ IncludeCategories:
51
+ - Regex: '^<.*\.h>'
52
+ Priority: 1
53
+ - Regex: '^<.*'
54
+ Priority: 2
55
+ - Regex: '.*'
56
+ Priority: 3
57
+ IncludeIsMainRegex: '([-_](test|unittest))?$'
58
+ IndentCaseLabels: true
59
+ IndentWidth: 2
60
+ IndentWrappedFunctionNames: false
61
+ JavaScriptQuotes: Leave
62
+ JavaScriptWrapImports: true
63
+ KeepEmptyLinesAtTheStartOfBlocks: false
64
+ MacroBlockBegin: ''
65
+ MacroBlockEnd: ''
66
+ MaxEmptyLinesToKeep: 1
67
+ NamespaceIndentation: None
68
+ ObjCBlockIndentWidth: 2
69
+ ObjCSpaceAfterProperty: false
70
+ ObjCSpaceBeforeProtocolList: false
71
+ PenaltyBreakBeforeFirstCallParameter: 1
72
+ PenaltyBreakComment: 300
73
+ PenaltyBreakFirstLessLess: 120
74
+ PenaltyBreakString: 1000
75
+ PenaltyExcessCharacter: 1000000
76
+ PenaltyReturnTypeOnItsOwnLine: 200
77
+ PointerAlignment: Left
78
+ ReflowComments: true
79
+ SortIncludes: true
80
+ SpaceAfterCStyleCast: false
81
+ SpaceBeforeAssignmentOperators: true
82
+ SpaceBeforeParens: ControlStatements
83
+ SpaceInEmptyParentheses: false
84
+ SpacesBeforeTrailingComments: 2
85
+ SpacesInAngles: false
86
+ SpacesInContainerLiterals: true
87
+ SpacesInCStyleCastParentheses: false
88
+ SpacesInParentheses: false
89
+ SpacesInSquareBrackets: false
90
+ Standard: Auto
91
+ TabWidth: 8
92
+ UseTab: Never
93
+ ...
@@ -0,0 +1,14 @@
1
+ [flake8]
2
+ select = B,C,E,F,P,T4,W,B9
3
+ max-line-length = 80
4
+ # C408 ignored because we like the dict keyword argument syntax
5
+ # E501 is not flexible enough, we're using B950 instead
6
+ ignore =
7
+ E203,E305,E402,E501,E721,E741,F403,F405,F821,F841,F999,W503,W504,C408,E302,W291,E303,
8
+ # shebang has extra meaning in fbcode lints, so I think it's not worth trying
9
+ # to line this up with executable bit
10
+ EXE001, EXE002,
11
+ # these ignores are from flake8-bugbear; please fix!
12
+ B007,B008,
13
+ # these ignores are from flake8-comprehensions; please fix!
14
+ C400,C401,C402,C403,C404,C405,C407,C411,C413,C414,C415
@@ -0,0 +1,22 @@
1
+ name: Runtime Build
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ paths:
7
+ - 'runtime/**'
8
+ - '.github/workflows/runtime.yml'
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ os: [ubuntu-latest, macos-latest]
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Build runtime
20
+ run: |
21
+ cmake -B build -S runtime -DBUILD_TESTING=OFF
22
+ cmake --build build -j$(nproc 2>/dev/null || sysctl -n hw.ncpu)
@@ -0,0 +1,83 @@
1
+ name: UnitTest
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ paths:
7
+ - '**.py'
8
+ - '**.tsv'
9
+ - '**.toml'
10
+ - '**.yml'
11
+
12
+ jobs:
13
+ unit-test:
14
+ runs-on: ${{ matrix.os }}
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ os: ${{ github.event_name == 'pull_request' && fromJSON('["ubuntu-latest"]') || fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]') }}
19
+ python-version: ['3.9']
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ with:
23
+ fetch-depth: 0
24
+ - name: Set up Python ${{ matrix.python-version }} (non-Windows)
25
+ if: runner.os != 'Windows'
26
+ uses: actions/setup-python@v4
27
+ with:
28
+ python-version: ${{ matrix.python-version }}
29
+ - name: Cache Homebrew (macOS)
30
+ if: runner.os == 'macOS'
31
+ uses: actions/cache@v4
32
+ with:
33
+ path: |
34
+ /opt/homebrew/Cellar/openfst
35
+ /opt/homebrew/include/fst
36
+ /opt/homebrew/lib/libfst*
37
+ key: brew-openfst-${{ runner.os }}
38
+ - name: Install openfst (macOS)
39
+ if: runner.os == 'macOS'
40
+ run: |
41
+ brew install openfst || true
42
+ echo "CPLUS_INCLUDE_PATH=/opt/homebrew/include:$CPLUS_INCLUDE_PATH" >> $GITHUB_ENV
43
+ echo "LIBRARY_PATH=/opt/homebrew/lib:$LIBRARY_PATH" >> $GITHUB_ENV
44
+ - name: Cache pip (non-Windows)
45
+ if: runner.os != 'Windows'
46
+ uses: actions/cache@v4
47
+ with:
48
+ path: ~/.cache/pip
49
+ key: pip-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
50
+ - name: Install dependencies (non-Windows)
51
+ if: runner.os != 'Windows'
52
+ run: |
53
+ python -m pip install --upgrade pip
54
+ pip install .[test]
55
+ - name: Set up Conda (Windows)
56
+ if: runner.os == 'Windows'
57
+ uses: conda-incubator/setup-miniconda@v3
58
+ with:
59
+ python-version: ${{ matrix.python-version }}
60
+ activate-environment: test
61
+ use-only-tar-bz2: true
62
+ - name: Cache Conda (Windows)
63
+ if: runner.os == 'Windows'
64
+ uses: actions/cache@v4
65
+ with:
66
+ path: C:\Miniconda\envs\test
67
+ key: conda-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
68
+ - name: Install dependencies (Windows)
69
+ if: runner.os == 'Windows'
70
+ shell: bash -el {0}
71
+ run: |
72
+ conda install -c conda-forge pynini
73
+ python -m pip install --upgrade pip
74
+ pip install .[test] --no-deps
75
+ pip install flake8 pytest importlib_resources
76
+ - name: Lint with flake8
77
+ shell: bash -el {0}
78
+ run: |
79
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
80
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
81
+ - name: Test with pytest
82
+ shell: bash -el {0}
83
+ run: pytest
@@ -0,0 +1,71 @@
1
+ name: Build Wheels
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: 'Release version (optional, will be determined by setuptools_scm if not provided)'
8
+ required: false
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ python-version: [3.9]
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 0
20
+ - name: Set up Python ${{ matrix.python-version }}
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install .[test]
28
+ pip install build twine
29
+
30
+ - name: Build Graph
31
+ run: |
32
+ python -m tn --text "2.5平方电线" --overwrite_cache --language "zh"
33
+ python -m tn --text "2010-03-21" --overwrite_cache --language "en"
34
+ python -m itn --text "二点五平方电线" --overwrite_cache
35
+
36
+ - name: Prepare Graph
37
+ run: |
38
+ mkdir graph
39
+ cp tn/*.fst graph
40
+ cp itn/*.fst graph
41
+
42
+ - name: Get version from setuptools_scm
43
+ id: scm_version
44
+ run: |
45
+ # Check if version is provided as input
46
+ if [ -n "${{ github.event.inputs.version }}" ]; then
47
+ echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
48
+ else
49
+ # Get version from setuptools_scm
50
+ pip install setuptools_scm
51
+ VERSION=$(python -m setuptools_scm | tail -1)
52
+ echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
53
+ fi
54
+
55
+ - name: Upload Graph
56
+ uses: actions/upload-artifact@v4
57
+ with:
58
+ name: release-graph-v${{ steps.scm_version.outputs.VERSION }}
59
+ path: graph
60
+
61
+ - name: Build package
62
+ run: |
63
+ python -m build
64
+
65
+ - name: Publish on pypi.org
66
+ if: github.ref == 'refs/heads/master' && github.repository == 'wenet-e2e/WeTextProcessing'
67
+ env:
68
+ TWINE_USERNAME: __token__
69
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
70
+ run: |
71
+ python -m twine upload dist/*
@@ -0,0 +1,47 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Visual Studio Code files
7
+ .vscode
8
+ .vs
9
+
10
+ # PyCharm files
11
+ .idea
12
+
13
+ # Eclipse Project settings
14
+ *.*project
15
+ .settings
16
+
17
+ # Sublime Text settings
18
+ *.sublime-workspace
19
+ *.sublime-project
20
+
21
+ # Editor temporaries
22
+ *.swn
23
+ *.swo
24
+ *.swp
25
+ *.swm
26
+ *~
27
+
28
+ # IPython notebook checkpoints
29
+ .ipynb_checkpoints
30
+
31
+ # macOS dir files
32
+ .DS_Store
33
+
34
+ # Clangd files
35
+ .cache
36
+ compile_commands.json
37
+
38
+
39
+ # Setup files
40
+ WeTextProcessing.egg-info/
41
+ build/
42
+ dist/
43
+ tn/*.far
44
+ itn/*.far
45
+
46
+ # Version file(setuptools_scm generated)
47
+ tn/_version.py
@@ -0,0 +1,23 @@
1
+ exclude: '.*\.(txt|tsv)$'
2
+ repos:
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: v4.5.0
5
+ hooks:
6
+ - id: trailing-whitespace
7
+ - repo: https://github.com/pre-commit/mirrors-yapf
8
+ rev: 'v0.32.0'
9
+ hooks:
10
+ - id: yapf
11
+ - repo: https://github.com/pycqa/flake8
12
+ rev: '3.8.2'
13
+ hooks:
14
+ - id: flake8
15
+ - repo: https://github.com/pre-commit/mirrors-clang-format
16
+ rev: 'v17.0.6'
17
+ hooks:
18
+ - id: clang-format
19
+ exclude: '.*\.(json|java|js|m|mm|proto)'
20
+ - repo: https://github.com/cpplint/cpplint
21
+ rev: '1.6.1'
22
+ hooks:
23
+ - id: cpplint
@@ -0,0 +1,2 @@
1
+ root=runtime
2
+ filter=-build/c++11
@@ -1,17 +1,25 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: WeTextProcessing
3
- Version: 1.0.4.1
3
+ Version: 1.2.0
4
4
  Summary: WeTextProcessing, including TN & ITN
5
- Home-page: https://github.com/wenet-e2e/WeTextProcessing
6
- Author: Zhendong Peng, Xingchen Song
7
- Author-email: pzd17@tsinghua.org.cn, sxc19@tsinghua.org.cn
8
- License: UNKNOWN
9
- Platform: UNKNOWN
5
+ Author-email: Zhendong Peng <pzd17@tsinghua.org.cn>, Xingchen Song <sxc19@tsinghua.org.cn>
6
+ Project-URL: Homepage, https://github.com/wenet-e2e/WeTextProcessing
10
7
  Classifier: Programming Language :: Python :: 3
11
8
  Classifier: Operating System :: OS Independent
12
9
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
10
+ Requires-Python: >=3.7
13
11
  Description-Content-Type: text/markdown
14
12
  License-File: LICENSE
13
+ Requires-Dist: pynini>=2.1.6
14
+ Requires-Dist: importlib_resources
15
+ Provides-Extra: test
16
+ Requires-Dist: pytest; extra == "test"
17
+ Requires-Dist: flake8; extra == "test"
18
+ Provides-Extra: dev
19
+ Requires-Dist: flake8; extra == "dev"
20
+ Requires-Dist: pre-commit==3.5.0; extra == "dev"
21
+ Requires-Dist: pytest; extra == "dev"
22
+ Dynamic: license-file
15
23
 
16
24
  ## Text Normalization & Inverse Text Normalization
17
25
 
@@ -150,5 +158,3 @@ Or you can directly discuss on [Github Issues](https://github.com/wenet-e2e/WeTe
150
158
  3. Referred [Pynini](https://github.com/kylebgorman/pynini) for reading the FAR, and printing the shortest path of a lattice in the C++ runtime.
151
159
  4. Referred [TN of NeMo](https://github.com/NVIDIA/NeMo/tree/main/nemo_text_processing/text_normalization/zh) for the data to build the tagger graph.
152
160
  5. Referred [ITN of chinese_text_normalization](https://github.com/speechio/chinese_text_normalization/tree/master/thrax/src/cn) for the data to build the tagger graph.
153
-
154
-
@@ -1,17 +1,25 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: WeTextProcessing
3
- Version: 1.0.4.1
3
+ Version: 1.2.0
4
4
  Summary: WeTextProcessing, including TN & ITN
5
- Home-page: https://github.com/wenet-e2e/WeTextProcessing
6
- Author: Zhendong Peng, Xingchen Song
7
- Author-email: pzd17@tsinghua.org.cn, sxc19@tsinghua.org.cn
8
- License: UNKNOWN
9
- Platform: UNKNOWN
5
+ Author-email: Zhendong Peng <pzd17@tsinghua.org.cn>, Xingchen Song <sxc19@tsinghua.org.cn>
6
+ Project-URL: Homepage, https://github.com/wenet-e2e/WeTextProcessing
10
7
  Classifier: Programming Language :: Python :: 3
11
8
  Classifier: Operating System :: OS Independent
12
9
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
10
+ Requires-Python: >=3.7
13
11
  Description-Content-Type: text/markdown
14
12
  License-File: LICENSE
13
+ Requires-Dist: pynini>=2.1.6
14
+ Requires-Dist: importlib_resources
15
+ Provides-Extra: test
16
+ Requires-Dist: pytest; extra == "test"
17
+ Requires-Dist: flake8; extra == "test"
18
+ Provides-Extra: dev
19
+ Requires-Dist: flake8; extra == "dev"
20
+ Requires-Dist: pre-commit==3.5.0; extra == "dev"
21
+ Requires-Dist: pytest; extra == "dev"
22
+ Dynamic: license-file
15
23
 
16
24
  ## Text Normalization & Inverse Text Normalization
17
25
 
@@ -150,5 +158,3 @@ Or you can directly discuss on [Github Issues](https://github.com/wenet-e2e/WeTe
150
158
  3. Referred [Pynini](https://github.com/kylebgorman/pynini) for reading the FAR, and printing the shortest path of a lattice in the C++ runtime.
151
159
  4. Referred [TN of NeMo](https://github.com/NVIDIA/NeMo/tree/main/nemo_text_processing/text_normalization/zh) for the data to build the tagger graph.
152
160
  5. Referred [ITN of chinese_text_normalization](https://github.com/speechio/chinese_text_normalization/tree/master/thrax/src/cn) for the data to build the tagger graph.
153
-
154
-