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
@@ -12,7 +12,7 @@ const DOWNLOAD_EVENT_ENDPOINT = 'https://ai.swmansion.com/telemetry/downloads/ap
12
12
  // self-referencing import would need package `exports` support in the consuming
13
13
  // bundler to load at all. A wrong value here is analytics noise; a failed
14
14
  // import would break the bundle.
15
- const LIB_VERSION = '0.10.6';
15
+ const LIB_VERSION = '0.10.7';
16
16
 
17
17
  // Anonymous analytics are on by default; apps opt out via setTelemetryEnabled.
18
18
  let telemetryEnabled = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-executorch",
3
- "version": "0.10.6",
3
+ "version": "0.10.7",
4
4
  "nativeLibsVersion": "0.10.6",
5
5
  "description": "An easy way to run AI models in React Native with ExecuTorch",
6
6
  "main": "./lib/module/index.js",
@@ -326,6 +326,8 @@ Pod::Spec.new do |s|
326
326
  "\"$(PODS_TARGET_SRCROOT)/third-party/include/executorch/extension/llm/tokenizers/third-party/re2\"",
327
327
  "\"$(PODS_TARGET_SRCROOT)/third-party/include/executorch/extension/llm/tokenizers/third-party/abseil-cpp\"",
328
328
  "\"$(PODS_TARGET_SRCROOT)/third-party/common/phonemis/src\"",
329
+ # phonemis's vendored xsimd includes itself as `xsimd/...` (its CMakeLists adds this too).
330
+ "\"$(PODS_TARGET_SRCROOT)/third-party/common/phonemis/src/third-party\"",
329
331
  ].join(' '),
330
332
  "WARNING_CFLAGS" => "-Wno-documentation",
331
333
  'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'x86_64',
@@ -10,7 +10,7 @@ const DOWNLOAD_EVENT_ENDPOINT = 'https://ai.swmansion.com/telemetry/downloads/ap
10
10
  // self-referencing import would need package `exports` support in the consuming
11
11
  // bundler to load at all. A wrong value here is analytics noise; a failed
12
12
  // import would break the bundle.
13
- const LIB_VERSION = '0.10.6';
13
+ const LIB_VERSION = '0.10.7';
14
14
 
15
15
  // Anonymous analytics are on by default; apps opt out via setTelemetryEnabled.
16
16
  let telemetryEnabled = true;
@@ -1,45 +1,101 @@
1
+ # ------------------------
2
+ # --- Project metadata ---
3
+ # ------------------------
1
4
  cmake_minimum_required(VERSION 3.10)
2
5
  project(phonemis VERSION 1.0 LANGUAGES CXX)
3
6
 
7
+ # ---------------------
4
8
  # --- Configuration ---
9
+ # ---------------------
5
10
  set(CMAKE_CXX_STANDARD 20)
6
11
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
7
12
 
13
+ # By default, we only build a static library.
14
+ # Building the tests (-DBUILD_TESTS=ON) and building the sample runner (-DBUILD_RUNNER=ON) must
15
+ # be explciitely specified as CMAKE options.
8
16
  option(BUILD_RUNNER "Build phonemis runner" OFF)
9
17
  option(BUILD_TESTS "Build tests" OFF)
10
18
 
19
+ # Additional option to specify the usage of ExecuTorch for neural model inference.
20
+ # To use it, you must explicitely link the package with ExecuTorch libs or
21
+ # build it together.
22
+ option(ET_ON "Use ExecuTorch" OFF)
23
+
24
+ # ----------------
11
25
  # --- Includes ---
26
+ # ----------------
12
27
  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
13
28
  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/third-party)
14
29
 
30
+ # --------------------
15
31
  # --- Source Files ---
32
+ # --------------------
16
33
  file(GLOB_RECURSE LIB_SOURCES CONFIGURE_DEPENDS
17
- ${CMAKE_CURRENT_SOURCE_DIR}/src/phonemis/*.cpp
34
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/phonemis/*.cpp
18
35
  )
19
36
  # Exclude main.cpp from the static library
20
37
  list(FILTER LIB_SOURCES EXCLUDE REGEX "main\\.cpp$")
21
38
 
22
- # --- Targets ---
39
+ # Exclude protophone sources when ExecuTorch is used
40
+ if(ET_ON)
41
+ list(FILTER LIB_SOURCES EXCLUDE REGEX "${CMAKE_CURRENT_SOURCE_DIR}/src/phonemis/protophone/")
42
+ endif()
23
43
 
44
+ # ---------------
45
+ # --- Targets ---
46
+ # ---------------
24
47
  # Always build the static library
25
48
  add_library(phonemis STATIC ${LIB_SOURCES})
26
49
 
50
+ if(ET_ON)
51
+ target_compile_definitions(phonemis PRIVATE ET_ON)
52
+ endif()
53
+
54
+ # Threading support (std::thread in the Protophone convolution stage).
55
+ find_package(Threads REQUIRED)
56
+ target_link_libraries(phonemis PUBLIC Threads::Threads)
57
+
58
+ # SIMD architecture selection (xsimd)
59
+ # xsimd picks its widest batch type at compile time from the enabled ISA. ARM
60
+ # targets (Android arm64-v8a, iOS arm64) already imply NEON, so nothing is
61
+ # needed there. For native x86_64 desktop builds we opt into AVX2 + FMA. The
62
+ # flag is PUBLIC so every translation unit (and the tests) share the same
63
+ # default arch, keeping xsimd's alignment/ABI consistent across the boundary.
64
+ if(NOT ET_ON AND NOT ANDROID AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS"
65
+ AND CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|AMD64|amd64)")
66
+ include(CheckCXXCompilerFlag)
67
+ check_cxx_compiler_flag("-mavx2" PHONEMIS_HAS_AVX2)
68
+ check_cxx_compiler_flag("-mfma" PHONEMIS_HAS_FMA)
69
+ if(PHONEMIS_HAS_AVX2)
70
+ target_compile_options(phonemis PUBLIC -mavx2)
71
+ endif()
72
+ if(PHONEMIS_HAS_FMA)
73
+ target_compile_options(phonemis PUBLIC -mfma)
74
+ endif()
75
+ endif()
76
+
27
77
  # Build runner if requested
28
78
  if(BUILD_RUNNER)
29
- set(MAIN_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/phonemis/main.cpp)
30
- add_executable(phonemis_runner ${MAIN_SOURCE})
31
- target_link_libraries(phonemis_runner PRIVATE phonemis)
79
+ set(MAIN_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/phonemis/main.cpp)
80
+ add_executable(phonemis_runner ${MAIN_SOURCE})
81
+ target_link_libraries(phonemis_runner PRIVATE phonemis)
32
82
  endif()
33
83
 
34
84
  # Build tests if requested
35
85
  if(BUILD_TESTS)
36
- file(GLOB TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/test/*.cpp)
37
-
38
- add_executable(phonemis_test ${TEST_SOURCES})
39
- target_link_libraries(phonemis_test PRIVATE phonemis)
40
-
41
- target_include_directories(phonemis_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/test)
42
- target_include_directories(phonemis_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
43
- target_compile_definitions(phonemis_test PRIVATE PHONEMIS_PROJECT_ROOT="${CMAKE_CURRENT_SOURCE_DIR}")
44
- target_compile_options(phonemis_test PRIVATE -Wno-deprecated-declarations)
86
+ file(GLOB TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/test/*.cpp)
87
+
88
+ add_executable(phonemis_test ${TEST_SOURCES})
89
+ target_link_libraries(phonemis_test PRIVATE phonemis)
90
+
91
+ target_include_directories(phonemis_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/test)
92
+ target_include_directories(phonemis_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
93
+ target_compile_definitions(phonemis_test PRIVATE PHONEMIS_PROJECT_ROOT="${CMAKE_CURRENT_SOURCE_DIR}")
94
+ target_compile_options(phonemis_test PRIVATE -Wno-deprecated-declarations)
95
+
96
+ # Always add previously excluded Protophone sources.
97
+ if(ET_ON)
98
+ file(GLOB_RECURSE PROTOPHONE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/phonemis/protophone/*.cpp)
99
+ target_sources(phonemis_test PRIVATE ${PROTOPHONE_SOURCES})
100
+ endif()
45
101
  endif()
@@ -1,29 +1,54 @@
1
1
  # Phonemis
2
2
 
3
- ![Status: In Development](https://img.shields.io/badge/status-in%20development-green)
4
-
5
3
  ## From Text to Sound
6
- Phonemis is a high-performance C++ library designed for **Grapheme-to-Phoneme (G2P)** conversion. It provides a robust pipeline for transforming raw text into *phonetic transcriptions* using the **International Phonetic Alphabet (IPA)**. The library is optimized for efficiency and portability, being pure C++ with no external dependencies, which makes it easy to implement on a wide range of systems including standard and mobile applications requiring text-to-speech frontend processing.
4
+
5
+ Phonemis is a high-performance C++ library for **Grapheme-to-Phoneme (G2P)** conversion. It
6
+ delivers universal **IPA phonemization** across many platforms with **zero external
7
+ dependencies**, making it an ideal frontend for text-to-speech systems on desktop, mobile, and
8
+ embedded devices.
7
9
 
8
10
  Currently supported languages:
9
- * 🇺🇸 English (US)
10
- * 🇬🇧 English (British)
11
11
 
12
- ## The Mechanics of Pronunciation
13
- The phonemization pipeline consists of several distinct stages designed to maximize accuracy and context awareness:
12
+ * 🇺🇸 English (US) — `en-us`
13
+ * 🇬🇧 English (British) — `en-gb`
14
+ * 🇩🇪 German — `de`
15
+ * 🇫🇷 French — `fr`
16
+ * 🇪🇸 Spanish — `es`
17
+ * 🇮🇹 Italian — `it`
18
+ * 🇵🇱 Polish — `pl`
19
+ * 🇵🇹 Portuguese — `pt`
20
+ * 🇮🇳 Hindi — `hi`
14
21
 
15
- 1. **Preprocessing**: Raw input text is normalized to handle encoding issues and standard formatting.
16
- 2. **Rule-based Tokenizer**: The text is segmented into tokens based on linguistic rules, separating words from punctuation and handling special cases.
17
- 3. **Part-of-Speech Tagging**: A Hidden Markov Model (HMM) bigram tagger is employed to assign grammatical categories to words. This model is trained on the Brown Corpus to resolve homograph ambiguities based on context.
18
- 4. **Viterbi Decoding**: The optimal sequence of tags is determined using the [Viterbi algorithm](https://en.wikipedia.org/wiki/Viterbi_algorithm), ensuring the most probable grammatical structure is selected.
19
- 5. **Lexicon-based Phonemization**: Words are converted to phonemes using extensive dictionaries, with fallback mechanisms for unknown tokens.
22
+ ## Repository Structure
20
23
 
21
- This library is inspired by the Python package [misaki](https://github.com/hexgrad/misaki).
24
+ ```
25
+ phonemis/
26
+ ├── data/ # Bundled resources (one subdirectory per language)
27
+ ├── src/
28
+ │ ├── phonemis/
29
+ │ │ ├── base/ # Core API: Pipeline, IPipeline, Config, phonemizer, tokenizer
30
+ │ │ ├── lang/ # Language-specific modules (en/, de/, fr/, …)
31
+ │ │ ├── protophone/ # Pure C++ neural model inference engine
32
+ │ │ └── utils/ # Conversions, string utilities, Unicode support
33
+ │ └── third-party/ # Bundled header-only dependencies (xsimd)
34
+ └── CMakeLists.txt
35
+ ```
36
+
37
+ Every language folder under `data/` contains the resources needed for phonemization — a lexicon
38
+ JSON file (word-to-phoneme dictionary), a Protophone model weights file (`.bin`) for neural
39
+ inference, and optionally a tagger JSON file for part-of-speech disambiguation (currently
40
+ available for English). These are the files you point to in `phonemizer::Config`.
22
41
 
23
42
  ## Installation
24
43
 
25
- ### Building with CMake
26
- Phonemis uses CMake as its build system. To build the static library:
44
+ ### Requirements
45
+ - **C++20** compiler
46
+ - **CMake** ≥ 3.10
47
+ - **xsimd** (bundled as a header-only library under `src/third-party/`)
48
+
49
+ ### Building the Library
50
+
51
+ The below script builds the package as a static library:
27
52
 
28
53
  ```bash
29
54
  mkdir build
@@ -32,39 +57,164 @@ cmake ..
32
57
  make
33
58
  ```
34
59
 
60
+ ### Build Options
61
+
62
+ | Option | Default | Description |
63
+ |--------|---------|-------------|
64
+ | `-DBUILD_RUNNER=ON` | OFF | Builds the `phonemis_runner` CLI tool |
65
+ | `-DBUILD_TESTS=ON` | OFF | Builds the test suite |
66
+ | `-DET_ON=ON` | OFF | Enables ExecuTorch inference (see below) |
67
+
68
+ ### ExecuTorch Integration
69
+
70
+ With `ET_ON=ON`, the built-in Protophone sources are excluded and neural phonemization is
71
+ delegated to ExecuTorch. You must link against the ExecuTorch runtime:
72
+
73
+ ```bash
74
+ cmake .. -DET_ON=ON -DCMAKE_PREFIX_PATH=/path/to/executorch
75
+ make
76
+ ```
77
+
78
+ When `ET_ON` is left OFF (the default), all neural inference runs through the built-in
79
+ Protophone model — no external runtime dependencies required.
80
+
81
+ ### SIMD Acceleration
82
+
83
+ SIMD is configured automatically at build time:
84
+ - **x86_64 desktop** (non-Emscripten, non-Android, non-iOS): AVX2 + FMA are enabled if the
85
+ compiler supports them (`-mavx2 -mfma`), accelerating Protophone's convolution and mixing
86
+ stages.
87
+ - **ARM** (Android arm64-v8a, iOS arm64): NEON is implicitly available and used by xsimd with
88
+ no extra flags.
89
+
35
90
  ### Mobile Builds
36
- The repository includes dedicated scripts for cross-compiling the library for mobile platforms:
37
- * **Android**: Use the provided Android build script to generate `.a` libraries for various ABIs (armeabi-v7a, arm64-v8a, x86, x86_64).
38
- * **iOS**: Use the iOS build script to generate a universal static library or framework.
91
+
92
+ Dedicated scripts are provided for cross-compiling:
93
+ - **Android**: Produces `.a` libraries for armeabi-v7a, arm64-v8a, x86, and x86_64 ABIs.
94
+ - **iOS**: Produces a universal static library or framework.
39
95
 
40
96
  ## Sample Usage
41
97
 
42
- Below is a minimalistic example demonstrating how to instantiate the pipeline and process text.
98
+ All lexicons and trained neural model weights are bundled in the `./data/` subdirectory, organized
99
+ by language code. The example below uses the English (US) resources:
43
100
 
44
101
  ```cpp
45
- #include <phonemis/pipeline.h>
46
- #include <phonemis/utilities/string_utils.h>
102
+ #include <phonemis/base/pipeline.h>
103
+ #include <phonemis/utils/conversions.h>
47
104
  #include <iostream>
48
105
 
49
- using namespace phonemis;
50
- using namespace phonemis::utilities;
51
-
52
106
  int main() {
53
- // Paths to required data files
54
- std::string tagger_path = "../data/hmm.json";
55
- std::string lexicon_path = "../data/dictionaries/us_merged.json";
107
+ using namespace phonemis;
108
+
109
+ phonemizer::Config phon_config;
110
+ phon_config.lang = "en-us";
111
+ phon_config.lexicon_filepath = "data/en-us/lexicon_full.json";
112
+ phon_config.nn_model_filepath = "data/en-us/phonemizer_en_us.bin";
113
+
114
+ Config config;
115
+ config.lang = "en-us";
116
+ config.phonemizer = phon_config;
56
117
 
57
- // Initialize pipeline for US English
58
- Pipeline pipeline(Lang::EN_US, tagger_path, lexicon_path);
118
+ Pipeline pipeline(config);
59
119
 
60
- // Process text
61
120
  std::string text = "I love it! This is the best day of my entire life.";
62
- auto phonemes = pipeline.process(text);
121
+ auto phonemes = pipeline(text);
63
122
 
64
- // Output result
65
123
  std::cout << "Text: " << text << "\n";
66
- std::cout << "Phonemes: " << string_utils::u32string_to_utf8(phonemes) << "\n";
124
+ std::cout << "Phonemes: " << utils::conversions::u32_to_utf8(phonemes) << "\n";
67
125
 
68
126
  return 0;
69
127
  }
70
128
  ```
129
+
130
+ The `Pipeline::operator()` accepts both `std::string_view` (UTF-8) and `std::u32string_view`
131
+ (UTF-32), returning phonemes as `std::u32string`. Individual pipeline stages —
132
+ `preprocess()`, `process()`, `postprocess()` — are also exposed.
133
+
134
+ ### Customizing preprocessing
135
+
136
+ Before phonemization, the text goes through layers which read it out loud: character and
137
+ whitespace normalization, abbreviations and web addresses, numbers, symbols, and character fixes. Each can be
138
+ turned off, and a language's own abbreviations and symbols can be extended or overridden:
139
+
140
+ ```cpp
141
+ Config config;
142
+ config.lang = "en-us";
143
+ config.phonemizer = phon_config;
144
+ config.preprocessor = {
145
+ .symbols = false, // Keep "&", "+", ... as written
146
+ .abbreviations = {{U"approx.", {U"approximately"}}}, // Added to the language's own
147
+ };
148
+ ```
149
+
150
+ | Field | Layer | Example |
151
+ |---|---|---|
152
+ | `normalize` | one form of each character | `’` → `'`, `„a“` → `"a"`, `a – b` → `a - b`, `…` → `...` |
153
+ | `trim` | whitespace normalization | `" a b , c"` → `"a b, c"` |
154
+ | `terms` | abbreviations, web addresses | `e.g.` → *for example*, `example.com` → *example dot com* |
155
+ | `numbers` | numbers, dates, money, units, ... | `$5` → *five dollars* |
156
+ | `symbols` | remaining symbols | `&` → *and* |
157
+ | `sanitize` | language's character fixes, if it has any | |
158
+ | `abbreviations`, `symbol_words` | extra table entries | `{U"™", {U"trademark"}}` |
159
+
160
+ All layers are on by default, and always run in this order: normalize, trim, terms, numbers, symbols, sanitize.
161
+
162
+ ### CLI Runner
163
+
164
+ ```bash
165
+ ./build/phonemis_runner --lang en-us \
166
+ --lexicon data/en-us/lexicon_full.json \
167
+ --model data/en-us/phonemizer_en_us.bin \
168
+ "Hello world"
169
+ ```
170
+
171
+ ## The Mechanics of Pronunciation
172
+
173
+ Phonemis combines three complementary phonemization strategies, selected per word to maximize
174
+ accuracy:
175
+
176
+ ### Rule-based
177
+
178
+ A language-aware tokenizer segments text using configurable rules for words, punctuation, and
179
+ special characters. A number-to-word layer verbalizes digits, dates, currencies, fractions, and
180
+ ordinals into their textual forms according to language-specific conventions (e.g., German
181
+ "einundzwanzig" unit-before-tens order, comma decimal separator).
182
+
183
+ ### Lexicon (lookup-based)
184
+
185
+ An O(1) dictionary lookup provides the fastest and most reliable phonemization. It is cheap, can
186
+ be prepared offline, and handles exception words like "read" (present vs. past tense) correctly.
187
+ Other languages can be extended simply by providing a lexicon JSON file.
188
+
189
+ ### Neural (Protophone)
190
+
191
+ For words not found in the lexicon, a neural phonemizer takes over. **Protophone** is a pure
192
+ C++ CTC-based model with SIMD-accelerated inference via xsimd (AVX2+FMA on x86_64, NEON on ARM).
193
+ When built with `ET_ON=ON`, inference is delegated to **ExecuTorch** instead, enabling optimized
194
+ on-device acceleration.
195
+
196
+ These strategies are combined through a **hybrid phonemizer**: the lexicon is tried first, and
197
+ the neural model serves as a fallback. Each level can be individually enabled or disabled via
198
+ configuration.
199
+
200
+ ### Extending to a New Language
201
+
202
+ Phonemis is designed to be contribution-friendly. Adding support for a new language requires
203
+ three files under `src/phonemis/lang/XX/`:
204
+
205
+ | File | Purpose | Requirement |
206
+ |------|---------|-------------|
207
+ | `constants.h` | Language-specific data: number words (cardinals, ordinals), currencies, units, months, symbol words, tokenizer special-character rules. | Mandatory |
208
+ | `num2word.h` / `num2word.cpp` | Number verbalizer extending `processor::num2word::Num2WordLayer<NumberReading>`: the language's number notation, its own patterns (dates, phones, ordinal suffixes), how context decides a reading (`resolve`) and the readings themselves (`read_*`). | Mandatory |
209
+ | `patterns.h` / `patterns.cpp` | Number patterns the generic ones do not cover (Roman ordinals, law numbers). | Optional |
210
+ | `pipeline.h` | Pipeline class extending `IPipeline`. Orchestrates preprocessing layers (trimming, number and symbol verbalization), a tokenizer, and a `HybridPhonemizer<LexiconPhonemizer, NeuralPhonemizer>`. | Mandatory |
211
+ | Lexicon JSON / Protophone model | Word-to-phoneme mappings **or** trained neural model (`.bin`). | At least one required |
212
+
213
+ Then register the language in the factory method at `src/phonemis/base/pipeline.cpp`.
214
+
215
+ ## License
216
+
217
+ The source code of Phonemis is released under the [MIT license](LICENSE). Some of the data in `data/` and the bundled
218
+ libraries in `src/third-party/` come from other projects under their own licenses: see
219
+ [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). In particular, the English part-of-speech tagger (`tagger.json`)
220
+ is derived from a corpus licensed for non-commercial use only, so leave out `Config::tagger` in commercial products.
@@ -0,0 +1,57 @@
1
+ # Third-party notices
2
+
3
+ The source code of Phonemis is licensed under the MIT license (see [LICENSE](LICENSE)). Some data files in
4
+ [`data/`](data/) and some bundled libraries in [`src/third-party/`](src/third-party/) come from other projects and
5
+ are distributed under their own terms, listed below. The full texts of those licenses are in
6
+ [`licenses/`](licenses/).
7
+
8
+ ## Data
9
+
10
+ ### English lexicons
11
+
12
+ - **Files:** `data/en-us/lexicon_full.json`, `data/en-us/lexicon_small.json`, `data/en-gb/lexicon_full.json`,
13
+ `data/en-gb/lexicon_small.json`
14
+ - **Source:** the gold and silver pronunciation dictionaries of [misaki](https://github.com/hexgrad/misaki)
15
+ by hexgrad.
16
+ - **License:** Apache License 2.0, see [`licenses/misaki-Apache-2.0.txt`](licenses/misaki-Apache-2.0.txt).
17
+ - **Changes:** the dictionaries were modified for Phonemis:
18
+ - flattened, so that a word's part-of-speech variants become separate `word|TAG` entries
19
+ ([`scripts/tools/create_lexicon.py`](scripts/tools/create_lexicon.py));
20
+ - the gold and silver dictionaries were merged into one file
21
+ ([`scripts/tools/concatenate_lexicons.py`](scripts/tools/concatenate_lexicons.py));
22
+ - the small lexicons are reduced versions of the full ones.
23
+
24
+ ### English part-of-speech tagger
25
+
26
+ - **Files:** `data/en-us/tagger.json`, `data/en-gb/tagger.json` (and the tag descriptions in `tags.json`)
27
+ - **Source:** HMM probabilities computed by [`scripts/tools/create_tagger.py`](scripts/tools/create_tagger.py) from
28
+ the sentences of the [Brown Corpus](http://www.hit.uib.no/icame/brown/bcm.html) (W. N. Francis and H. Kučera, as
29
+ distributed with NLTK), tagged with [spaCy](https://spacy.io).
30
+ - **License:** NLTK lists the Brown Corpus as *"May be used for non-commercial purposes."* Treat these files as
31
+ **not cleared for commercial use**.
32
+ - **Commercial use:** the tagger is optional. Leave out `Config::tagger`, and English is phonemized without it,
33
+ with weaker handling of words whose pronunciation depends on their part of speech (*read*, *used to*). A tagger
34
+ trained on commercially usable text is planned.
35
+
36
+ ### Neural phonemizer models
37
+
38
+ - **Files:** `data/*/phonemizer_*.bin`
39
+ - **Source:** Protophone models trained by the Phonemis authors on pronunciations generated with
40
+ [misaki](https://github.com/hexgrad/misaki): its gold and silver dictionaries for English and, for the other
41
+ languages, its espeak-ng backend ([espeak-ng](https://github.com/espeak-ng/espeak-ng) is licensed under GPL-3.0).
42
+ - **License:** MIT, as the rest of Phonemis. The models contain only weights learned from those pronunciations: no
43
+ code or dictionaries of misaki or espeak-ng.
44
+
45
+ ## Bundled libraries
46
+
47
+ | Library | Location | License |
48
+ |---|---|---|
49
+ | [JSON for Modern C++](https://github.com/nlohmann/json) 3.12.0, by Niels Lohmann | `src/third-party/json.hpp` | MIT, see [`licenses/nlohmann-json-MIT.txt`](licenses/nlohmann-json-MIT.txt) |
50
+ | [xsimd](https://github.com/xtensor-stack/xsimd) 14.2, by Johan Mabille, Sylvain Corlay, Wolf Vollprecht, Martin Renou, QuantStack and Serge Guelton | `src/third-party/xsimd/` | BSD 3-Clause, see [`licenses/xsimd-BSD-3-Clause.txt`](licenses/xsimd-BSD-3-Clause.txt) |
51
+
52
+ ## Unicode data
53
+
54
+ `src/phonemis/utils/unicode_table.h` is generated by
55
+ [`scripts/tools/generate_unicode_table.py`](scripts/tools/generate_unicode_table.py) from Python's Unicode database,
56
+ which is derived from the Unicode Character Database. Copyright © 1991-2026 Unicode, Inc., distributed under the
57
+ Unicode License v3, see [`licenses/Unicode-3.0.txt`](licenses/Unicode-3.0.txt).