react-native-executorch 0.10.6 → 0.10.7

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 (237) hide show
  1. package/lib/module/fetcher/telemetry.js +1 -1
  2. package/package.json +1 -1
  3. package/react-native-executorch.podspec +2 -0
  4. package/src/fetcher/telemetry.ts +1 -1
  5. package/third-party/common/phonemis/CMakeLists.txt +70 -14
  6. package/third-party/common/phonemis/README.md +183 -33
  7. package/third-party/common/phonemis/THIRD_PARTY_NOTICES.md +57 -0
  8. package/third-party/common/phonemis/knowledge/code_style.md +642 -0
  9. package/third-party/common/phonemis/licenses/Unicode-3.0.txt +39 -0
  10. package/third-party/common/phonemis/licenses/misaki-Apache-2.0.txt +201 -0
  11. package/third-party/common/phonemis/licenses/nlohmann-json-MIT.txt +21 -0
  12. package/third-party/common/phonemis/licenses/xsimd-BSD-3-Clause.txt +29 -0
  13. package/third-party/common/phonemis/src/phonemis/base/config.h +6 -0
  14. package/third-party/common/phonemis/src/phonemis/base/ipipeline.cpp +75 -0
  15. package/third-party/common/phonemis/src/phonemis/base/ipipeline.h +21 -0
  16. package/third-party/common/phonemis/src/phonemis/base/phonemizer/constants.h +2 -5
  17. package/third-party/common/phonemis/src/phonemis/base/phonemizer/lexicon_phonemizer.cpp +3 -4
  18. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/neural_phonemizer.cpp +17 -8
  19. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/neural_phonemizer.h +4 -0
  20. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/tokenizer.cpp +21 -6
  21. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/tokenizer.h +13 -4
  22. package/third-party/common/phonemis/src/phonemis/base/pipeline.cpp +8 -0
  23. package/third-party/common/phonemis/src/phonemis/base/pipeline.h +19 -0
  24. package/third-party/common/phonemis/src/phonemis/base/processor/common/conditions.cpp +37 -0
  25. package/third-party/common/phonemis/src/phonemis/base/processor/common/conditions.h +45 -0
  26. package/third-party/common/phonemis/src/phonemis/base/processor/common/constants.h +10 -0
  27. package/third-party/common/phonemis/src/phonemis/base/processor/common/context.cpp +105 -0
  28. package/third-party/common/phonemis/src/phonemis/base/processor/common/context.h +49 -0
  29. package/third-party/common/phonemis/src/phonemis/base/processor/common/document.cpp +173 -0
  30. package/third-party/common/phonemis/src/phonemis/base/processor/common/document.h +67 -0
  31. package/third-party/common/phonemis/src/phonemis/base/processor/common/text.cpp +75 -0
  32. package/third-party/common/phonemis/src/phonemis/base/processor/common/text.h +60 -0
  33. package/third-party/common/phonemis/src/phonemis/base/processor/common/types.h +18 -0
  34. package/third-party/common/phonemis/src/phonemis/base/processor/config.h +53 -0
  35. package/third-party/common/phonemis/src/phonemis/base/processor/layer.h +9 -7
  36. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/constants.h +20 -0
  37. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/layer.cpp +89 -0
  38. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/layer.h +35 -0
  39. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/types.h +16 -0
  40. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/kind.h +40 -0
  41. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/layer.h +382 -0
  42. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/notation.h +30 -0
  43. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/numerals.cpp +51 -0
  44. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/numerals.h +31 -0
  45. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern.h +30 -0
  46. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern_set.cpp +17 -0
  47. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern_set.h +31 -0
  48. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/patterns.cpp +811 -0
  49. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/patterns.h +285 -0
  50. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/primitives.cpp +64 -0
  51. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/primitives.h +23 -0
  52. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/types.h +94 -0
  53. package/third-party/common/phonemis/src/phonemis/base/processor/layers/sanitizer/layer.cpp +19 -0
  54. package/third-party/common/phonemis/src/phonemis/base/processor/{sanitizer_layer.h → layers/sanitizer/layer.h} +8 -8
  55. package/third-party/common/phonemis/src/phonemis/base/processor/layers/sym2word/layer.cpp +65 -0
  56. package/third-party/common/phonemis/src/phonemis/base/processor/layers/sym2word/layer.h +29 -0
  57. package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/layer.cpp +170 -0
  58. package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/layer.h +40 -0
  59. package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/types.h +25 -0
  60. package/third-party/common/phonemis/src/phonemis/base/processor/layers/trim/layer.cpp +47 -0
  61. package/third-party/common/phonemis/src/phonemis/base/processor/layers/trim/layer.h +19 -0
  62. package/third-party/common/phonemis/src/phonemis/base/processor/preprocessor.cpp +60 -0
  63. package/third-party/common/phonemis/src/phonemis/base/processor/preprocessor.h +45 -0
  64. package/third-party/common/phonemis/src/phonemis/base/processor/processor.cpp +6 -7
  65. package/third-party/common/phonemis/src/phonemis/base/processor/processor.h +14 -10
  66. package/third-party/common/phonemis/src/phonemis/base/tagger/hmm_tagger.cpp +89 -52
  67. package/third-party/common/phonemis/src/phonemis/base/tagger/hmm_tagger.h +16 -9
  68. package/third-party/common/phonemis/src/phonemis/base/tokenizer/tokenizer.cpp +13 -12
  69. package/third-party/common/phonemis/src/phonemis/lang/de/constants.h +183 -19
  70. package/third-party/common/phonemis/src/phonemis/lang/de/num2word.cpp +355 -309
  71. package/third-party/common/phonemis/src/phonemis/lang/de/num2word.h +42 -17
  72. package/third-party/common/phonemis/src/phonemis/lang/de/patterns.cpp +56 -0
  73. package/third-party/common/phonemis/src/phonemis/lang/de/patterns.h +15 -0
  74. package/third-party/common/phonemis/src/phonemis/lang/de/pipeline.h +3 -3
  75. package/third-party/common/phonemis/src/phonemis/lang/en/constants.h +181 -30
  76. package/third-party/common/phonemis/src/phonemis/lang/en/hmm_tagger.cpp +5 -7
  77. package/third-party/common/phonemis/src/phonemis/lang/en/num2word.cpp +232 -135
  78. package/third-party/common/phonemis/src/phonemis/lang/en/num2word.h +41 -16
  79. package/third-party/common/phonemis/src/phonemis/lang/en/pipeline.h +3 -10
  80. package/third-party/common/phonemis/src/phonemis/lang/es/constants.h +182 -60
  81. package/third-party/common/phonemis/src/phonemis/lang/es/num2word.cpp +247 -212
  82. package/third-party/common/phonemis/src/phonemis/lang/es/num2word.h +38 -18
  83. package/third-party/common/phonemis/src/phonemis/lang/es/patterns.cpp +50 -0
  84. package/third-party/common/phonemis/src/phonemis/lang/es/patterns.h +15 -0
  85. package/third-party/common/phonemis/src/phonemis/lang/es/pipeline.h +3 -3
  86. package/third-party/common/phonemis/src/phonemis/lang/fr/constants.h +152 -26
  87. package/third-party/common/phonemis/src/phonemis/lang/fr/num2word.cpp +252 -179
  88. package/third-party/common/phonemis/src/phonemis/lang/fr/num2word.h +38 -15
  89. package/third-party/common/phonemis/src/phonemis/lang/fr/patterns.cpp +83 -0
  90. package/third-party/common/phonemis/src/phonemis/lang/fr/patterns.h +15 -0
  91. package/third-party/common/phonemis/src/phonemis/lang/fr/pipeline.h +3 -3
  92. package/third-party/common/phonemis/src/phonemis/lang/hi/constants.h +62 -10
  93. package/third-party/common/phonemis/src/phonemis/lang/hi/num2word.cpp +74 -123
  94. package/third-party/common/phonemis/src/phonemis/lang/hi/num2word.h +27 -16
  95. package/third-party/common/phonemis/src/phonemis/lang/hi/pipeline.h +5 -3
  96. package/third-party/common/phonemis/src/phonemis/lang/it/constants.h +122 -42
  97. package/third-party/common/phonemis/src/phonemis/lang/it/num2word.cpp +200 -207
  98. package/third-party/common/phonemis/src/phonemis/lang/it/num2word.h +30 -18
  99. package/third-party/common/phonemis/src/phonemis/lang/it/patterns.cpp +25 -0
  100. package/third-party/common/phonemis/src/phonemis/lang/it/patterns.h +15 -0
  101. package/third-party/common/phonemis/src/phonemis/lang/it/pipeline.h +3 -3
  102. package/third-party/common/phonemis/src/phonemis/lang/pl/constants.h +346 -77
  103. package/third-party/common/phonemis/src/phonemis/lang/pl/num2word.cpp +631 -246
  104. package/third-party/common/phonemis/src/phonemis/lang/pl/num2word.h +47 -15
  105. package/third-party/common/phonemis/src/phonemis/lang/pl/pipeline.h +6 -6
  106. package/third-party/common/phonemis/src/phonemis/lang/pt/constants.h +201 -0
  107. package/third-party/common/phonemis/src/phonemis/lang/pt/num2word.cpp +365 -0
  108. package/third-party/common/phonemis/src/phonemis/lang/pt/num2word.h +53 -0
  109. package/third-party/common/phonemis/src/phonemis/lang/pt/pipeline.h +4 -2
  110. package/third-party/common/phonemis/src/phonemis/main.cpp +42 -11
  111. package/third-party/common/phonemis/src/phonemis/protophone/meta.h +24 -0
  112. package/third-party/common/phonemis/src/phonemis/protophone/numeric.h +26 -0
  113. package/third-party/common/phonemis/src/phonemis/protophone/protophone.cpp +525 -0
  114. package/third-party/common/phonemis/src/phonemis/protophone/protophone.h +80 -0
  115. package/third-party/common/phonemis/src/phonemis/protophone/tensor.h +76 -0
  116. package/third-party/common/phonemis/src/phonemis/protophone/tensor_utils.h +89 -0
  117. package/third-party/common/phonemis/src/phonemis/protophone/tensor_view.h +125 -0
  118. package/third-party/common/phonemis/src/phonemis/protophone/types.h +43 -0
  119. package/third-party/common/phonemis/src/phonemis/utils/strings.h +20 -14
  120. package/third-party/common/phonemis/src/phonemis/utils/unicode.h +15 -1
  121. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_arithmetic.hpp +267 -0
  122. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_bit.hpp +232 -0
  123. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_cast.hpp +43 -0
  124. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_complex.hpp +112 -0
  125. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_details.hpp +386 -0
  126. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_logical.hpp +240 -0
  127. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_math.hpp +2601 -0
  128. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_memory.hpp +1006 -0
  129. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_rounding.hpp +72 -0
  130. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_swizzle.hpp +260 -0
  131. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_trigo.hpp +996 -0
  132. package/third-party/common/phonemis/src/third-party/xsimd/arch/utils/shifts.hpp +82 -0
  133. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx.hpp +2111 -0
  134. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx2.hpp +1591 -0
  135. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx2_128.hpp +170 -0
  136. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512bw.hpp +724 -0
  137. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512cd.hpp +28 -0
  138. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512dq.hpp +270 -0
  139. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512er.hpp +17 -0
  140. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512f.hpp +2919 -0
  141. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512ifma.hpp +17 -0
  142. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512pf.hpp +17 -0
  143. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vbmi.hpp +76 -0
  144. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vbmi2.hpp +130 -0
  145. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vnni_avx512bw.hpp +17 -0
  146. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vnni_avx512vbmi2.hpp +17 -0
  147. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx_128.hpp +164 -0
  148. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avxvnni.hpp +17 -0
  149. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_common.hpp +26 -0
  150. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_common_fwd.hpp +127 -0
  151. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_constants.hpp +393 -0
  152. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_emulated.hpp +787 -0
  153. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_avx.hpp +93 -0
  154. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_avx2.hpp +46 -0
  155. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_sse.hpp +97 -0
  156. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma4.hpp +92 -0
  157. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_i8mm_neon64.hpp +17 -0
  158. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_isa.hpp +148 -0
  159. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_neon.hpp +3580 -0
  160. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_neon64.hpp +1614 -0
  161. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_rvv.hpp +1515 -0
  162. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_scalar.hpp +1210 -0
  163. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse2.hpp +2333 -0
  164. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse3.hpp +66 -0
  165. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse4_1.hpp +510 -0
  166. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse4_2.hpp +44 -0
  167. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_ssse3.hpp +186 -0
  168. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sve.hpp +1186 -0
  169. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_vsx.hpp +947 -0
  170. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_vxe.hpp +787 -0
  171. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_wasm.hpp +1819 -0
  172. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_arch.hpp +242 -0
  173. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_config.hpp +633 -0
  174. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features.hpp +50 -0
  175. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_arm.hpp +132 -0
  176. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_ppc.hpp +54 -0
  177. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_riscv.hpp +95 -0
  178. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_s390x.hpp +56 -0
  179. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_x86.hpp +1121 -0
  180. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpuid.hpp +144 -0
  181. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_getauxval.hpp +159 -0
  182. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_macros.hpp +78 -0
  183. package/third-party/common/phonemis/src/third-party/xsimd/math/xsimd_rem_pio2.hpp +707 -0
  184. package/third-party/common/phonemis/src/third-party/xsimd/memory/xsimd_aligned_allocator.hpp +349 -0
  185. package/third-party/common/phonemis/src/third-party/xsimd/memory/xsimd_alignment.hpp +102 -0
  186. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_all_registers.hpp +57 -0
  187. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_api.hpp +3106 -0
  188. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx2_register.hpp +57 -0
  189. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512bw_register.hpp +51 -0
  190. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512cd_register.hpp +51 -0
  191. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512dq_register.hpp +51 -0
  192. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512er_register.hpp +51 -0
  193. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512f_register.hpp +77 -0
  194. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512ifma_register.hpp +51 -0
  195. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512pf_register.hpp +51 -0
  196. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vbmi2_register.hpp +51 -0
  197. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vbmi_register.hpp +51 -0
  198. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vnni_avx512bw_register.hpp +54 -0
  199. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vnni_avx512vbmi2_register.hpp +53 -0
  200. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx_register.hpp +79 -0
  201. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avxvnni_register.hpp +44 -0
  202. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch.hpp +1666 -0
  203. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch_constant.hpp +572 -0
  204. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch_fwd.hpp +41 -0
  205. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_common_arch.hpp +49 -0
  206. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_emulated_register.hpp +80 -0
  207. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_avx2_register.hpp +50 -0
  208. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_avx_register.hpp +50 -0
  209. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_sse_register.hpp +50 -0
  210. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma4_register.hpp +50 -0
  211. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_i8mm_neon64_register.hpp +55 -0
  212. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_neon64_register.hpp +55 -0
  213. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_neon_register.hpp +130 -0
  214. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_register.hpp +96 -0
  215. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_rvv_register.hpp +491 -0
  216. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse2_register.hpp +59 -0
  217. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse3_register.hpp +49 -0
  218. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse4_1_register.hpp +48 -0
  219. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse4_2_register.hpp +48 -0
  220. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_ssse3_register.hpp +48 -0
  221. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sve_register.hpp +216 -0
  222. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_traits.hpp +409 -0
  223. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_utils.hpp +462 -0
  224. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_vsx_register.hpp +84 -0
  225. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_vxe_register.hpp +86 -0
  226. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_wasm_register.hpp +59 -0
  227. package/third-party/common/phonemis/src/third-party/xsimd/utils/bits.hpp +122 -0
  228. package/third-party/common/phonemis/src/third-party/xsimd/utils/xsimd_type_traits.hpp +145 -0
  229. package/third-party/common/phonemis/src/third-party/xsimd/xsimd.hpp +43 -0
  230. package/third-party/common/phonemis/src/phonemis/base/processor/constants.h +0 -11
  231. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/config.h +0 -16
  232. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/layer.cpp +0 -271
  233. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/layer.h +0 -45
  234. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/types.h +0 -29
  235. package/third-party/common/phonemis/src/phonemis/base/processor/sanitizer_layer.cpp +0 -22
  236. package/third-party/common/phonemis/src/phonemis/base/processor/trim_layer.cpp +0 -40
  237. package/third-party/common/phonemis/src/phonemis/base/processor/trim_layer.h +0 -22
@@ -1,77 +1,157 @@
1
1
  #pragma once
2
2
 
3
+ #include <phonemis/base/processor/layers/num2word/types.h>
4
+ #include <phonemis/base/processor/common/conditions.h>
5
+ #include <phonemis/base/processor/layers/num2word/notation.h>
6
+ #include <phonemis/base/processor/layers/term2word/types.h>
3
7
  #include <phonemis/base/tokenizer/types.h>
4
8
 
9
+ #include <array>
5
10
  #include <cstdint>
6
11
  #include <map>
7
12
  #include <string>
13
+ #include <string_view>
8
14
  #include <unordered_map>
9
15
  #include <unordered_set>
16
+ #include <utility>
10
17
  #include <vector>
11
18
 
12
19
  namespace phonemis::it::constants {
13
20
 
14
21
  // --- Number to Word Normalization ---
15
22
  namespace num2word {
16
- // Base cardinals: number -> word. Includes units, teens, and round tens
17
- // 20-90. All other values are composed: tens+units fuse into a single word
18
- // with elision rules, hundreds/thousands concatenate, millions+ take a space.
19
- inline const std::unordered_map<int32_t, std::u32string> kCardinals = {
20
- {0, U"zero"}, {1, U"uno"}, {2, U"due"}, {3, U"tre"}, {4, U"quattro"},
21
- {5, U"cinque"}, {6, U"sei"}, {7, U"sette"}, {8, U"otto"}, {9, U"nove"},
22
- {10, U"dieci"}, {11, U"undici"}, {12, U"dodici"}, {13, U"tredici"}, {14, U"quattordici"},
23
- {15, U"quindici"}, {16, U"sedici"}, {17, U"diciassette"}, {18, U"diciotto"}, {19, U"diciannove"},
24
- {20, U"venti"}, {30, U"trenta"}, {40, U"quaranta"}, {50, U"cinquanta"}, {60, U"sessanta"},
25
- {70, U"settanta"}, {80, U"ottanta"}, {90, U"novanta"}
23
+ using ::phonemis::processor::num2word::DateFormat;
24
+ using ::phonemis::processor::num2word::Forms;
25
+ using ::phonemis::processor::num2word::Joiners;
26
+ using ::phonemis::processor::num2word::Keys;
27
+ using ::phonemis::processor::num2word::keys_of;
28
+ using ::phonemis::processor::num2word::Notation;
29
+ using ::phonemis::processor::num2word::PhoneFormat;
30
+ using ::phonemis::processor::num2word::SuffixFormat;
31
+
32
+ inline constexpr std::array<std::u32string_view, 20> kOnes = {
33
+ U"zero", U"uno", U"due", U"tre", U"quattro", U"cinque", U"sei",
34
+ U"sette", U"otto", U"nove", U"dieci", U"undici", U"dodici", U"tredici",
35
+ U"quattordici", U"quindici", U"sedici", U"diciassette", U"diciotto", U"diciannove"
26
36
  };
27
37
 
28
- // Base ordinals in masculine singular form. Feminine/plural variants are
29
- // derived at verbalization time from the provided suffix.
30
- inline const std::unordered_map<int32_t, std::u32string> kOrdinals = {
31
- {1, U"primo"}, {2, U"secondo"}, {3, U"terzo"}, {4, U"quarto"}, {5, U"quinto"},
32
- {6, U"sesto"}, {7, U"settimo"}, {8, U"ottavo"}, {9, U"nono"}, {10, U"decimo"}
38
+ inline constexpr std::array<std::u32string_view, 10> kTens = {
39
+ U"", U"", U"venti", U"trenta", U"quaranta", U"cinquanta", U"sessanta", U"settanta", U"ottanta", U"novanta"
33
40
  };
34
41
 
35
- // Large-scale names (singular forms).
36
- inline const std::map<std::int64_t, std::u32string> kLargeCardinals = {
37
- {100LL, U"cento"},
38
- {1000LL, U"mille"},
39
- {1000000LL, U"milione"},
40
- {1000000000LL, U"miliardo"}
42
+ // Ordinals up to ten; later ones are the cardinal with -esimo
43
+ inline constexpr std::array<std::u32string_view, 11> kOrdinals = {
44
+ U"", U"primo", U"secondo", U"terzo", U"quarto", U"quinto", U"sesto", U"settimo", U"ottavo", U"nono", U"decimo"
41
45
  };
42
46
 
43
- // Plural forms for scales. "cento" is invariable as a multiplier prefix;
44
- // "mille" becomes "mila"; "milione"/"miliardo" pluralize as regular nouns.
45
- inline const std::unordered_map<std::int64_t, std::u32string> kLargeCardinalsPlural = {
46
- {100LL, U"cento"},
47
- {1000LL, U"mila"},
48
- {1000000LL, U"milioni"},
49
- {1000000000LL, U"miliardi"}
47
+ inline const std::vector<std::u32string> kMonths = {
48
+ U"gennaio", U"febbraio", U"marzo", U"aprile", U"maggio", U"giugno",
49
+ U"luglio", U"agosto", U"settembre", U"ottobre", U"novembre", U"dicembre"
50
50
  };
51
51
 
52
- // Currencies (singular and plural). "euro" is invariable; "dollaro" and
53
- // "sterlina" follow regular noun pluralization.
54
- inline const std::unordered_map<char32_t, std::u32string> kCurrencies = {
55
- {U'$', U"dollaro"}, {U'€', U"euro"}, {U'£', U"sterlina"}
52
+ inline const std::unordered_map<std::u32string, Forms> kCurrencies = {
53
+ {U"€", {U"euro", U"euro"}}, {U"$", {U"dollaro", U"dollari"}}, {U"£", {U"sterlina", U"sterline"}}
56
54
  };
57
55
 
58
- inline const std::unordered_map<char32_t, std::u32string> kCurrenciesPlural = {
59
- {U'$', U"dollari"}, {U'€', U"euro"}, {U'£', U"sterline"}
56
+ // Most scales are written as the word they are read with: 3 milioni
57
+ inline const std::unordered_map<std::u32string, Forms> kScales = {
58
+ {U"mila", {U"mila", U"mila"}}, {U"k", {U"mila", U"mila"}}, {U"K", {U"mila", U"mila"}},
59
+ {U"milione", {U"milione", U"milione"}}, {U"milioni", {U"milioni", U"milioni"}},
60
+ {U"miliardo", {U"miliardo", U"miliardo"}}, {U"miliardi", {U"miliardi", U"miliardi"}},
61
+ {U"mln", {U"milione", U"milioni"}}, {U"mld", {U"miliardo", U"miliardi"}}
60
62
  };
61
63
 
62
- // Months (index 1 = January)
63
- inline const std::vector<std::u32string> kMonths = {
64
- U"", U"gennaio", U"febbraio", U"marzo", U"aprile", U"maggio", U"giugno",
65
- U"luglio", U"agosto", U"settembre", U"ottobre", U"novembre", U"dicembre"
64
+ inline const std::unordered_map<std::u32string, Forms> kUnits = {
65
+ {U"km", {U"chilometro", U"chilometri"}}, {U"m", {U"metro", U"metri"}},
66
+ {U"cm", {U"centimetro", U"centimetri"}}, {U"mm", {U"millimetro", U"millimetri"}},
67
+ {U"m²", {U"metro quadro", U"metri quadri"}}, {U"m2", {U"metro quadro", U"metri quadri"}},
68
+ {U"km²", {U"chilometro quadrato", U"chilometri quadrati"}}, {U"m³", {U"metro cubo", U"metri cubi"}},
69
+ {U"kg", {U"chilo", U"chili"}}, {U"g", {U"grammo", U"grammi"}},
70
+ {U"mg", {U"milligrammo", U"milligrammi"}}, {U"l", {U"litro", U"litri"}},
71
+ {U"ml", {U"millilitro", U"millilitri"}}, {U"TB", {U"terabyte", U"terabyte"}},
72
+ {U"GB", {U"giga", U"giga"}}, {U"MB", {U"mega", U"mega"}},
73
+ {U"Hz", {U"hertz", U"hertz"}}, {U"kHz", {U"kilohertz", U"kilohertz"}},
74
+ {U"MHz", {U"megahertz", U"megahertz"}}, {U"GHz", {U"gigahertz", U"gigahertz"}},
75
+ {U"W", {U"watt", U"watt"}}, {U"kW", {U"kilowatt", U"kilowatt"}},
76
+ {U"kWh", {U"kilowattora", U"kilowattora"}}, {U"V", {U"volt", U"volt"}},
77
+ {U"km/h", {U"chilometro orario", U"chilometri orari"}}, {U"°C", {U"grado", U"gradi"}},
78
+ {U"°", {U"grado", U"gradi"}}
79
+ };
80
+
81
+ inline const std::map<std::pair<uint64_t, uint64_t>, std::u32string> kFractions = {
82
+ {{1, 2}, U"un mezzo"}, {{1, 3}, U"un terzo"}, {{2, 3}, U"due terzi"}, {{1, 4}, U"un quarto"},
83
+ {{3, 4}, U"tre quarti"}
84
+ };
85
+
86
+ // Words before a time with a dot, which make it a time: alle 21.30
87
+ inline const std::unordered_set<std::u32string> kTimeWords = {
88
+ U"alle", U"ore", U"dalle", U"le", U"verso", U"entro", U"per"
89
+ };
90
+
91
+ // --- Notation: how numbers are written ---
92
+ inline const Notation kNotation = {
93
+ .group_separators = U".", .decimal_separators = U",.", .time_separators = U":.",
94
+ .currencies = keys_of(kCurrencies), .scales = keys_of(kScales), .units = keys_of(kUnits), .fractions = true
95
+ };
96
+
97
+ // Words between numbers: 3.8.10, 10.0.0.51, 10-15, 1920x1080, 2:1, -5, 2 + 2
98
+ inline const Joiners kJoiners = {
99
+ .point = U"punto", .dot = U"punto", .range = U"-", .by = U"per", .score = U" a ", .minus = U"meno", .plus = U"più"
66
100
  };
67
101
 
68
- // Recognized Italian ordinal suffixes attached to digits (e.g. "1º", "1ª",
69
- // plural "1ºs", "1ªs").
70
- inline const std::unordered_set<std::u32string> kOrdinalSuffixes = {
71
- U"º", U"ª", U"ºs", U"ªs"
102
+ // 24/03/2022
103
+ inline const DateFormat kDateFormat = {.boundaries = U".,/-"};
104
+
105
+ // 333 1234567, 06 1234 5678, 06 12345678
106
+ inline const std::vector<PhoneFormat> kPhoneFormats = {
107
+ {.groups = {{3, 3}, {6, 7}}, .separators = U" "},
108
+ {.groups = {{2, 4}, {3, 4}, {4, 4}}, .separators = U" ", .leading_zero = true},
109
+ {.groups = {{2, 4}, {6, 8}}, .separators = U" ", .leading_zero = true}
72
110
  };
111
+
112
+ // 1º, 2 ª: a sign, possibly after a space
113
+ inline const Keys kOrdinalSigns = {U"º", U"ª"};
114
+ inline const SuffixFormat kOrdinalSignFormat = {.space = true};
115
+
116
+ // 21esimo, 33esima
117
+ inline const Keys kOrdinalSuffixes = {U"esimo", U"esima", U"esimi", U"esime"};
73
118
  } // namespace num2word
74
119
 
120
+ // --- Symbols to Word Normalization ---
121
+ namespace sym2word {
122
+ using ::phonemis::processor::Readings;
123
+
124
+ // "&" only joins English names: AT&T, R&B
125
+ inline const Readings kSymbols = {
126
+ {U"&", {U"and"}}, {U"+", {U"più"}}, {U"=", {U"uguale a"}}, {U"@", {U"chiocciola"}}, {U"%", {U"per cento"}},
127
+ {U"°", {U"gradi"}}, {U"#", {U"hashtag"}}, {U"²", {U"al quadrato"}}, {U"³", {U"al cubo"}}, {U"π", {U"pi greco"}},
128
+ {U"×", {U"per"}}, {U"€", {U"euro"}}, {U"$", {U"dollari"}}, {U"£", {U"sterline"}}, {U"§", {U"paragrafo"}}
129
+ };
130
+ } // namespace sym2word
131
+
132
+ // --- Terms to Word Normalization ---
133
+ namespace term2word {
134
+ using ::phonemis::processor::before_number;
135
+ using ::phonemis::processor::term2word::Terms;
136
+
137
+ inline const Terms kTerms = {
138
+ .abbreviations = {
139
+ // Before a number only: n. 5
140
+ {U"n.", {{U"numero", before_number}}},
141
+ {U"N.", {{U"numero", before_number}}},
142
+ {U"nr.", {{U"numero", before_number}}},
143
+ {U"n°", {{U"numero", before_number}}},
144
+ {U"N°", {{U"numero", before_number}}},
145
+ {U"art.", {{U"articolo", before_number}}},
146
+ {U"Art.", {{U"articolo", before_number}}},
147
+ {U"pag.", {{U"pagina", before_number}}},
148
+ {U"cap.", {{U"capitolo", before_number}}},
149
+ {U"§", {{U"paragrafo", before_number}}},
150
+ },
151
+ .web = {.dot = U"punto", .at = U"chiocciola", .slash = U"slash"}
152
+ };
153
+ } // namespace term2word
154
+
75
155
  // --- Tokenization Rules ---
76
156
  namespace tokenizer {
77
157
  using ::phonemis::tokenizer::split::Rule;