shevchenko 2.1.3 → 3.0.0-rc.0

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 (468) hide show
  1. package/.github/workflows/npm-publish.yml +36 -0
  2. package/README.md +8 -7
  3. package/dist/cjs/anthroponym-declension/anthroponym-inflector.js +39 -0
  4. package/dist/cjs/anthroponym-declension/anthroponym-inflector.js.map +1 -0
  5. package/dist/cjs/anthroponym-declension/family-name-inflector.js +69 -0
  6. package/dist/cjs/anthroponym-declension/family-name-inflector.js.map +1 -0
  7. package/dist/cjs/anthroponym-declension/given-name-inflector.js +40 -0
  8. package/dist/cjs/anthroponym-declension/given-name-inflector.js.map +1 -0
  9. package/dist/cjs/anthroponym-declension/name-inflector.js +30 -0
  10. package/dist/cjs/anthroponym-declension/name-inflector.js.map +1 -0
  11. package/dist/cjs/anthroponym-declension/patronymic-name-inflector.js +40 -0
  12. package/dist/cjs/anthroponym-declension/patronymic-name-inflector.js.map +1 -0
  13. package/dist/cjs/bootstrap.js +29 -0
  14. package/dist/cjs/bootstrap.js.map +1 -0
  15. package/dist/cjs/gender-detection/detect-gender.js +55 -0
  16. package/dist/cjs/gender-detection/detect-gender.js.map +1 -0
  17. package/dist/cjs/gender-detection/given-names-genders.json.js +1158 -0
  18. package/dist/cjs/gender-detection/given-names-genders.json.js.map +1 -0
  19. package/dist/cjs/index.js +36 -0
  20. package/dist/cjs/index.js.map +1 -0
  21. package/dist/cjs/input-validation.js +83 -0
  22. package/dist/cjs/input-validation.js.map +1 -0
  23. package/dist/cjs/language/alphabet.js +54 -0
  24. package/dist/cjs/language/alphabet.js.map +1 -0
  25. package/dist/cjs/language/grammatical-case.js +27 -0
  26. package/dist/cjs/language/grammatical-case.js.map +1 -0
  27. package/dist/cjs/language/grammatical-gender.js +22 -0
  28. package/dist/cjs/language/grammatical-gender.js.map +1 -0
  29. package/dist/cjs/language/letter-case.js +49 -0
  30. package/dist/cjs/language/letter-case.js.map +1 -0
  31. package/dist/cjs/language/linguistics.js +35 -0
  32. package/dist/cjs/language/linguistics.js.map +1 -0
  33. package/dist/cjs/language/word-class.js +22 -0
  34. package/dist/cjs/language/word-class.js.map +1 -0
  35. package/dist/cjs/shevchenko.js +67 -154555
  36. package/dist/cjs/shevchenko.js.map +1 -1
  37. package/dist/cjs/word-class-recognition/artifacts/model.bundle.json.js +199 -0
  38. package/dist/cjs/word-class-recognition/artifacts/model.bundle.json.js.map +1 -0
  39. package/dist/cjs/word-class-recognition/cache/incorrect-predictions.json.js +1459 -0
  40. package/dist/cjs/word-class-recognition/cache/incorrect-predictions.json.js.map +1 -0
  41. package/dist/cjs/word-class-recognition/model-bundle-loader.js +74 -0
  42. package/dist/cjs/word-class-recognition/model-bundle-loader.js.map +1 -0
  43. package/dist/cjs/word-class-recognition/model-config.js +20 -0
  44. package/dist/cjs/word-class-recognition/model-config.js.map +1 -0
  45. package/dist/cjs/word-class-recognition/word-class-recognizer.js +76 -0
  46. package/dist/cjs/word-class-recognition/word-class-recognizer.js.map +1 -0
  47. package/dist/cjs/word-class-recognition/word-class-transformer.js +52 -0
  48. package/dist/cjs/word-class-recognition/word-class-transformer.js.map +1 -0
  49. package/dist/cjs/word-class-recognition/word-transformer.js +37 -0
  50. package/dist/cjs/word-class-recognition/word-transformer.js.map +1 -0
  51. package/dist/cjs/word-declension/append-command-runner.js +28 -0
  52. package/dist/cjs/word-declension/append-command-runner.js.map +1 -0
  53. package/dist/cjs/word-declension/command-runner-factory.js +38 -0
  54. package/dist/cjs/word-declension/command-runner-factory.js.map +1 -0
  55. package/dist/cjs/word-declension/declension-rule-inflector.js +65 -0
  56. package/dist/cjs/word-declension/declension-rule-inflector.js.map +1 -0
  57. package/dist/cjs/word-declension/declension-rule-matchers.js +43 -0
  58. package/dist/cjs/word-declension/declension-rule-matchers.js.map +1 -0
  59. package/dist/cjs/word-declension/declension-rules.json.js +7405 -0
  60. package/dist/cjs/word-declension/declension-rules.json.js.map +1 -0
  61. package/dist/cjs/word-declension/declension-types.js +24 -0
  62. package/dist/cjs/word-declension/declension-types.js.map +1 -0
  63. package/dist/cjs/word-declension/index.js +28 -0
  64. package/dist/cjs/word-declension/index.js.map +1 -0
  65. package/dist/cjs/word-declension/replace-command-runner.js +28 -0
  66. package/dist/cjs/word-declension/replace-command-runner.js.map +1 -0
  67. package/dist/es/anthroponym-declension/anthroponym-inflector.d.ts +16 -0
  68. package/dist/es/anthroponym-declension/anthroponym-inflector.d.ts.map +1 -0
  69. package/dist/es/anthroponym-declension/anthroponym-inflector.js +35 -0
  70. package/dist/es/anthroponym-declension/anthroponym-inflector.js.map +1 -0
  71. package/dist/es/anthroponym-declension/anthroponym.d.ts +6 -0
  72. package/dist/es/anthroponym-declension/anthroponym.d.ts.map +1 -0
  73. package/dist/es/anthroponym-declension/family-name-inflector.d.ts +14 -0
  74. package/dist/es/anthroponym-declension/family-name-inflector.d.ts.map +1 -0
  75. package/dist/es/anthroponym-declension/family-name-inflector.js +65 -0
  76. package/dist/es/anthroponym-declension/family-name-inflector.js.map +1 -0
  77. package/dist/es/anthroponym-declension/given-name-inflector.d.ts +12 -0
  78. package/dist/es/anthroponym-declension/given-name-inflector.d.ts.map +1 -0
  79. package/dist/es/anthroponym-declension/given-name-inflector.js +36 -0
  80. package/dist/es/anthroponym-declension/given-name-inflector.js.map +1 -0
  81. package/dist/es/anthroponym-declension/index.d.ts +6 -0
  82. package/dist/es/anthroponym-declension/index.d.ts.map +1 -0
  83. package/dist/es/anthroponym-declension/name-inflector.d.ts +12 -0
  84. package/dist/es/anthroponym-declension/name-inflector.d.ts.map +1 -0
  85. package/dist/es/anthroponym-declension/name-inflector.js +26 -0
  86. package/dist/es/anthroponym-declension/name-inflector.js.map +1 -0
  87. package/dist/es/anthroponym-declension/patronymic-name-inflector.d.ts +12 -0
  88. package/dist/es/anthroponym-declension/patronymic-name-inflector.d.ts.map +1 -0
  89. package/dist/es/anthroponym-declension/patronymic-name-inflector.js +36 -0
  90. package/dist/es/anthroponym-declension/patronymic-name-inflector.js.map +1 -0
  91. package/dist/es/bootstrap.d.ts +4 -0
  92. package/dist/{types → es}/bootstrap.d.ts.map +1 -1
  93. package/dist/es/bootstrap.js +25 -0
  94. package/dist/es/bootstrap.js.map +1 -0
  95. package/dist/es/contracts.d.ts +21 -0
  96. package/dist/es/contracts.d.ts.map +1 -0
  97. package/dist/es/gender-detection/detect-gender.d.ts +11 -0
  98. package/dist/es/gender-detection/detect-gender.d.ts.map +1 -0
  99. package/dist/es/gender-detection/detect-gender.js +51 -0
  100. package/dist/es/gender-detection/detect-gender.js.map +1 -0
  101. package/dist/es/gender-detection/detect-gender.test.d.ts +2 -0
  102. package/dist/es/gender-detection/detect-gender.test.d.ts.map +1 -0
  103. package/dist/es/gender-detection/given-names-genders.json.js +1156 -0
  104. package/dist/es/gender-detection/given-names-genders.json.js.map +1 -0
  105. package/dist/es/gender-detection/index.d.ts +2 -0
  106. package/dist/es/gender-detection/index.d.ts.map +1 -0
  107. package/dist/es/index.d.ts +2 -0
  108. package/dist/es/index.d.ts.map +1 -0
  109. package/dist/es/index.js +13 -0
  110. package/dist/es/index.js.map +1 -0
  111. package/dist/es/input-validation.d.ts +14 -0
  112. package/dist/es/input-validation.d.ts.map +1 -0
  113. package/dist/es/input-validation.js +78 -0
  114. package/dist/es/input-validation.js.map +1 -0
  115. package/dist/es/input-validation.test.d.ts +2 -0
  116. package/dist/es/input-validation.test.d.ts.map +1 -0
  117. package/dist/es/language/alphabet.d.ts +48 -0
  118. package/dist/es/language/alphabet.d.ts.map +1 -0
  119. package/dist/es/language/alphabet.js +52 -0
  120. package/dist/es/language/alphabet.js.map +1 -0
  121. package/dist/es/language/grammatical-case.d.ts +13 -0
  122. package/dist/es/language/grammatical-case.d.ts.map +1 -0
  123. package/dist/es/language/grammatical-case.js +25 -0
  124. package/dist/es/language/grammatical-case.js.map +1 -0
  125. package/dist/es/language/grammatical-gender.d.ts +8 -0
  126. package/dist/es/language/grammatical-gender.d.ts.map +1 -0
  127. package/dist/es/language/grammatical-gender.js +20 -0
  128. package/dist/es/language/grammatical-gender.js.map +1 -0
  129. package/dist/es/language/index.d.ts +7 -0
  130. package/dist/es/language/index.d.ts.map +1 -0
  131. package/dist/es/language/letter-case.d.ts +6 -0
  132. package/dist/es/language/letter-case.d.ts.map +1 -0
  133. package/dist/es/language/letter-case.js +45 -0
  134. package/dist/es/language/letter-case.js.map +1 -0
  135. package/dist/es/language/letter-case.test.d.ts +2 -0
  136. package/dist/es/language/letter-case.test.d.ts.map +1 -0
  137. package/dist/es/language/linguistics.d.ts +7 -0
  138. package/dist/es/language/linguistics.d.ts.map +1 -0
  139. package/dist/es/language/linguistics.js +30 -0
  140. package/dist/es/language/linguistics.js.map +1 -0
  141. package/dist/es/language/linguistics.test.d.ts +2 -0
  142. package/dist/es/language/linguistics.test.d.ts.map +1 -0
  143. package/dist/es/language/word-class.d.ts +8 -0
  144. package/dist/es/language/word-class.d.ts.map +1 -0
  145. package/dist/es/language/word-class.js +20 -0
  146. package/dist/es/language/word-class.js.map +1 -0
  147. package/dist/es/shevchenko.d.ts +54 -0
  148. package/dist/es/shevchenko.d.ts.map +1 -0
  149. package/dist/es/shevchenko.js +60 -154480
  150. package/dist/es/shevchenko.js.map +1 -1
  151. package/dist/es/word-class-recognition/artifacts/model.bundle.json.js +190 -0
  152. package/dist/es/word-class-recognition/artifacts/model.bundle.json.js.map +1 -0
  153. package/dist/es/word-class-recognition/cache/incorrect-predictions.json.js +1457 -0
  154. package/dist/es/word-class-recognition/cache/incorrect-predictions.json.js.map +1 -0
  155. package/dist/es/word-class-recognition/data.utils.d.ts +16 -0
  156. package/dist/es/word-class-recognition/data.utils.d.ts.map +1 -0
  157. package/dist/es/word-class-recognition/index.d.ts +3 -0
  158. package/dist/es/word-class-recognition/index.d.ts.map +1 -0
  159. package/dist/es/word-class-recognition/model-bundle-loader.d.ts +15 -0
  160. package/dist/es/word-class-recognition/model-bundle-loader.d.ts.map +1 -0
  161. package/dist/es/word-class-recognition/model-bundle-loader.js +69 -0
  162. package/dist/es/word-class-recognition/model-bundle-loader.js.map +1 -0
  163. package/dist/es/word-class-recognition/model-bundle-saver.d.ts +12 -0
  164. package/dist/es/word-class-recognition/model-bundle-saver.d.ts.map +1 -0
  165. package/dist/es/word-class-recognition/model-config.d.ts +5 -0
  166. package/dist/es/word-class-recognition/model-config.d.ts.map +1 -0
  167. package/dist/es/word-class-recognition/model-config.js +16 -0
  168. package/dist/es/word-class-recognition/model-config.js.map +1 -0
  169. package/dist/es/word-class-recognition/scripts/cache-incorrect-predictions.d.ts +2 -0
  170. package/dist/es/word-class-recognition/scripts/cache-incorrect-predictions.d.ts.map +1 -0
  171. package/dist/es/word-class-recognition/scripts/train-model.d.ts +7 -0
  172. package/dist/es/word-class-recognition/scripts/train-model.d.ts.map +1 -0
  173. package/dist/es/word-class-recognition/word-class-recognizer.d.ts +18 -0
  174. package/dist/es/word-class-recognition/word-class-recognizer.d.ts.map +1 -0
  175. package/dist/es/word-class-recognition/word-class-recognizer.js +52 -0
  176. package/dist/es/word-class-recognition/word-class-recognizer.js.map +1 -0
  177. package/dist/es/word-class-recognition/word-class-transformer.d.ts +6 -0
  178. package/dist/es/word-class-recognition/word-class-transformer.d.ts.map +1 -0
  179. package/dist/es/word-class-recognition/word-class-transformer.js +48 -0
  180. package/dist/es/word-class-recognition/word-class-transformer.js.map +1 -0
  181. package/dist/es/word-class-recognition/word-class-transformer.test.d.ts +2 -0
  182. package/dist/es/word-class-recognition/word-class-transformer.test.d.ts.map +1 -0
  183. package/dist/es/word-class-recognition/word-transformer.d.ts +7 -0
  184. package/dist/es/word-class-recognition/word-transformer.d.ts.map +1 -0
  185. package/dist/es/word-class-recognition/word-transformer.js +33 -0
  186. package/dist/es/word-class-recognition/word-transformer.js.map +1 -0
  187. package/dist/es/word-class-recognition/word-transformer.test.d.ts +2 -0
  188. package/dist/es/word-class-recognition/word-transformer.test.d.ts.map +1 -0
  189. package/dist/es/word-declension/append-command-runner.d.ts +12 -0
  190. package/dist/es/word-declension/append-command-runner.d.ts.map +1 -0
  191. package/dist/es/word-declension/append-command-runner.js +24 -0
  192. package/dist/es/word-declension/append-command-runner.js.map +1 -0
  193. package/dist/es/word-declension/command-runner-factory.d.ts +9 -0
  194. package/dist/es/word-declension/command-runner-factory.d.ts.map +1 -0
  195. package/dist/es/word-declension/command-runner-factory.js +34 -0
  196. package/dist/es/word-declension/command-runner-factory.js.map +1 -0
  197. package/dist/es/word-declension/declension-rule-inflector.d.ts +16 -0
  198. package/dist/es/word-declension/declension-rule-inflector.d.ts.map +1 -0
  199. package/dist/es/word-declension/declension-rule-inflector.js +60 -0
  200. package/dist/es/word-declension/declension-rule-inflector.js.map +1 -0
  201. package/dist/es/word-declension/declension-rule-matchers.d.ts +19 -0
  202. package/dist/es/word-declension/declension-rule-matchers.d.ts.map +1 -0
  203. package/dist/es/word-declension/declension-rule-matchers.js +36 -0
  204. package/dist/es/word-declension/declension-rule-matchers.js.map +1 -0
  205. package/dist/es/word-declension/declension-rules.json.js +7403 -0
  206. package/dist/es/word-declension/declension-rules.json.js.map +1 -0
  207. package/dist/es/word-declension/declension-types.d.ts +36 -0
  208. package/dist/es/word-declension/declension-types.d.ts.map +1 -0
  209. package/dist/es/word-declension/declension-types.js +22 -0
  210. package/dist/es/word-declension/declension-types.js.map +1 -0
  211. package/dist/es/word-declension/index.d.ts +7 -0
  212. package/dist/es/word-declension/index.d.ts.map +1 -0
  213. package/dist/es/word-declension/index.js +20 -0
  214. package/dist/es/word-declension/index.js.map +1 -0
  215. package/dist/es/word-declension/inflection-command-runner.d.ts +4 -0
  216. package/dist/es/word-declension/inflection-command-runner.d.ts.map +1 -0
  217. package/dist/es/word-declension/replace-command-runner.d.ts +12 -0
  218. package/dist/es/word-declension/replace-command-runner.d.ts.map +1 -0
  219. package/dist/es/word-declension/replace-command-runner.js +24 -0
  220. package/dist/es/word-declension/replace-command-runner.js.map +1 -0
  221. package/dist/es/word-declension/scripts/load-declension-rules.d.ts +2 -0
  222. package/dist/es/word-declension/scripts/load-declension-rules.d.ts.map +1 -0
  223. package/dist/umd/shevchenko.min.js +4680 -68
  224. package/dist/umd/shevchenko.min.js.map +1 -1
  225. package/package.json +38 -37
  226. package/src/anthroponym-declension/README.md +3 -0
  227. package/src/anthroponym-declension/anthroponym-inflector.ts +58 -0
  228. package/src/anthroponym-declension/anthroponym.ts +5 -0
  229. package/src/anthroponym-declension/family-name-inflector.ts +75 -0
  230. package/src/anthroponym-declension/given-name-inflector.ts +38 -0
  231. package/src/anthroponym-declension/index.ts +5 -0
  232. package/src/anthroponym-declension/name-inflector.ts +38 -0
  233. package/src/anthroponym-declension/patronymic-name-inflector.ts +38 -0
  234. package/src/bootstrap.ts +20 -47
  235. package/src/contracts.ts +22 -0
  236. package/src/gender-detection/README.md +5 -0
  237. package/src/gender-detection/detect-gender.ts +43 -0
  238. package/src/gender-detection/given-names-genders.json +1144 -0
  239. package/src/gender-detection/index.ts +1 -0
  240. package/src/index.ts +1 -0
  241. package/src/input-validation.ts +80 -0
  242. package/src/language/README.md +3 -0
  243. package/src/language/alphabet.ts +49 -0
  244. package/src/language/grammatical-case.ts +12 -0
  245. package/src/language/grammatical-gender.ts +7 -0
  246. package/src/language/index.ts +6 -0
  247. package/src/language/letter-case.ts +35 -0
  248. package/src/language/linguistics.ts +20 -0
  249. package/src/language/word-class.ts +7 -0
  250. package/src/shevchenko.ts +65 -33
  251. package/src/word-class-recognition/README.md +5 -0
  252. package/src/word-class-recognition/artifacts/model.bundle.json +7 -0
  253. package/src/word-class-recognition/artifacts/model.json +1 -0
  254. package/src/word-class-recognition/artifacts/weights.bin +0 -0
  255. package/src/word-class-recognition/cache/incorrect-predictions.json +1445 -0
  256. package/src/word-class-recognition/data.utils.ts +57 -0
  257. package/src/word-class-recognition/index.ts +2 -0
  258. package/src/word-class-recognition/model-bundle-loader.ts +73 -0
  259. package/src/word-class-recognition/model-bundle-saver.ts +105 -0
  260. package/src/word-class-recognition/model-config.ts +4 -0
  261. package/src/word-class-recognition/scripts/cache-incorrect-predictions.ts +46 -0
  262. package/src/word-class-recognition/scripts/train-model.ts +95 -0
  263. package/src/word-class-recognition/word-class-recognizer.ts +54 -0
  264. package/src/word-class-recognition/word-class-transformer.ts +38 -0
  265. package/src/word-class-recognition/word-transformer.ts +23 -0
  266. package/src/word-declension/README.md +3 -0
  267. package/src/word-declension/append-command-runner.ts +18 -0
  268. package/src/word-declension/command-runner-factory.ts +23 -0
  269. package/src/{anthroponym-inflection/rule-inflector.ts → word-declension/declension-rule-inflector.ts} +17 -7
  270. package/src/word-declension/declension-rule-matchers.ts +30 -0
  271. package/src/{resources/inflector/rules.json → word-declension/declension-rules.json} +1119 -1119
  272. package/src/word-declension/declension-types.ts +41 -0
  273. package/src/word-declension/index.ts +9 -0
  274. package/src/word-declension/inflection-command-runner.ts +3 -0
  275. package/src/word-declension/replace-command-runner.ts +18 -0
  276. package/src/word-declension/scripts/load-declension-rules.ts +14 -0
  277. package/dist/types/anthroponym-inflection/anthroponym-inflector.d.ts +0 -15
  278. package/dist/types/anthroponym-inflection/anthroponym-inflector.d.ts.map +0 -1
  279. package/dist/types/anthroponym-inflection/append-command-runner.d.ts +0 -12
  280. package/dist/types/anthroponym-inflection/append-command-runner.d.ts.map +0 -1
  281. package/dist/types/anthroponym-inflection/command-runner-factory.d.ts +0 -9
  282. package/dist/types/anthroponym-inflection/command-runner-factory.d.ts.map +0 -1
  283. package/dist/types/anthroponym-inflection/first-name-inflector.d.ts +0 -12
  284. package/dist/types/anthroponym-inflection/first-name-inflector.d.ts.map +0 -1
  285. package/dist/types/anthroponym-inflection/index.d.ts +0 -6
  286. package/dist/types/anthroponym-inflection/index.d.ts.map +0 -1
  287. package/dist/types/anthroponym-inflection/inflector-command-runner.d.ts +0 -4
  288. package/dist/types/anthroponym-inflection/inflector-command-runner.d.ts.map +0 -1
  289. package/dist/types/anthroponym-inflection/inflector.types.d.ts +0 -37
  290. package/dist/types/anthroponym-inflection/inflector.types.d.ts.map +0 -1
  291. package/dist/types/anthroponym-inflection/last-name-inflector.d.ts +0 -14
  292. package/dist/types/anthroponym-inflection/last-name-inflector.d.ts.map +0 -1
  293. package/dist/types/anthroponym-inflection/middle-name-inflector.d.ts +0 -12
  294. package/dist/types/anthroponym-inflection/middle-name-inflector.d.ts.map +0 -1
  295. package/dist/types/anthroponym-inflection/name-inflector.d.ts +0 -12
  296. package/dist/types/anthroponym-inflection/name-inflector.d.ts.map +0 -1
  297. package/dist/types/anthroponym-inflection/replace-command-runner.d.ts +0 -12
  298. package/dist/types/anthroponym-inflection/replace-command-runner.d.ts.map +0 -1
  299. package/dist/types/anthroponym-inflection/rule-inflector.d.ts +0 -12
  300. package/dist/types/anthroponym-inflection/rule-inflector.d.ts.map +0 -1
  301. package/dist/types/bootstrap.d.ts +0 -4
  302. package/dist/types/core/anthroponym.interface.d.ts +0 -8
  303. package/dist/types/core/anthroponym.interface.d.ts.map +0 -1
  304. package/dist/types/core/gender.enum.d.ts +0 -5
  305. package/dist/types/core/gender.enum.d.ts.map +0 -1
  306. package/dist/types/core/grammatical-case.enum.d.ts +0 -10
  307. package/dist/types/core/grammatical-case.enum.d.ts.map +0 -1
  308. package/dist/types/core/index.d.ts +0 -5
  309. package/dist/types/core/index.d.ts.map +0 -1
  310. package/dist/types/core/validator.d.ts +0 -8
  311. package/dist/types/core/validator.d.ts.map +0 -1
  312. package/dist/types/internal.d.ts +0 -2
  313. package/dist/types/internal.d.ts.map +0 -1
  314. package/dist/types/part-of-speech-recognition/index.d.ts +0 -6
  315. package/dist/types/part-of-speech-recognition/index.d.ts.map +0 -1
  316. package/dist/types/part-of-speech-recognition/neural-network-config.d.ts +0 -6
  317. package/dist/types/part-of-speech-recognition/neural-network-config.d.ts.map +0 -1
  318. package/dist/types/part-of-speech-recognition/neural-network-training-data.d.ts +0 -5
  319. package/dist/types/part-of-speech-recognition/neural-network-training-data.d.ts.map +0 -1
  320. package/dist/types/part-of-speech-recognition/neural-network.d.ts +0 -28
  321. package/dist/types/part-of-speech-recognition/neural-network.d.ts.map +0 -1
  322. package/dist/types/part-of-speech-recognition/part-of-speech-decoder.d.ts +0 -9
  323. package/dist/types/part-of-speech-recognition/part-of-speech-decoder.d.ts.map +0 -1
  324. package/dist/types/part-of-speech-recognition/part-of-speech-encoder.d.ts +0 -10
  325. package/dist/types/part-of-speech-recognition/part-of-speech-encoder.d.ts.map +0 -1
  326. package/dist/types/part-of-speech-recognition/part-of-speech-recognition-rule.d.ts +0 -19
  327. package/dist/types/part-of-speech-recognition/part-of-speech-recognition-rule.d.ts.map +0 -1
  328. package/dist/types/part-of-speech-recognition/part-of-speech-recognizer.d.ts +0 -14
  329. package/dist/types/part-of-speech-recognition/part-of-speech-recognizer.d.ts.map +0 -1
  330. package/dist/types/part-of-speech-recognition/part-of-speech.enum.d.ts +0 -5
  331. package/dist/types/part-of-speech-recognition/part-of-speech.enum.d.ts.map +0 -1
  332. package/dist/types/part-of-speech-recognition/word-encoder.d.ts +0 -9
  333. package/dist/types/part-of-speech-recognition/word-encoder.d.ts.map +0 -1
  334. package/dist/types/part-of-speech-recognition/word-transformer.d.ts +0 -7
  335. package/dist/types/part-of-speech-recognition/word-transformer.d.ts.map +0 -1
  336. package/dist/types/shevchenko.d.ts +0 -32
  337. package/dist/types/shevchenko.d.ts.map +0 -1
  338. package/dist/types/utils/lang.utils.d.ts +0 -7
  339. package/dist/types/utils/lang.utils.d.ts.map +0 -1
  340. package/dist/types/utils/regexp.utils.d.ts +0 -5
  341. package/dist/types/utils/regexp.utils.d.ts.map +0 -1
  342. package/dist/types/utils/string.utils.d.ts +0 -14
  343. package/dist/types/utils/string.utils.d.ts.map +0 -1
  344. package/nuxt/.eslintrc.json +0 -27
  345. package/nuxt/.prettierrc.json +0 -6
  346. package/nuxt/README.md +0 -27
  347. package/nuxt/app.config.ts +0 -3
  348. package/nuxt/app.vue +0 -5
  349. package/nuxt/assets/img/shevchenko_pixelized_304x304.jpg +0 -0
  350. package/nuxt/assets/img/shevchenko_pixelized_304x304.png +0 -0
  351. package/nuxt/assets/img/shevchenko_pixelized_608x608.jpg +0 -0
  352. package/nuxt/assets/style/main.scss +0 -3
  353. package/nuxt/components/about-modal.vue +0 -58
  354. package/nuxt/components/api-spec.vue +0 -25
  355. package/nuxt/components/contact-me-button.vue +0 -11
  356. package/nuxt/components/contact-me-modal.vue +0 -63
  357. package/nuxt/components/copy-button.vue +0 -38
  358. package/nuxt/components/declension-demo.vue +0 -38
  359. package/nuxt/components/declension-form.vue +0 -158
  360. package/nuxt/components/declension-preview.vue +0 -170
  361. package/nuxt/components/declension-results.vue +0 -135
  362. package/nuxt/components/error-404.vue +0 -15
  363. package/nuxt/components/github-issue-count.vue +0 -18
  364. package/nuxt/components/how-it-works.vue +0 -51
  365. package/nuxt/components/installation-instructions.vue +0 -33
  366. package/nuxt/components/library-docs.vue +0 -27
  367. package/nuxt/components/page-copyright.vue +0 -15
  368. package/nuxt/components/page-footer.vue +0 -32
  369. package/nuxt/components/page-header.vue +0 -4
  370. package/nuxt/components/preview-banner.vue +0 -32
  371. package/nuxt/components/share-links.vue +0 -108
  372. package/nuxt/components/top-nav-bar.vue +0 -165
  373. package/nuxt/components/ukrainian-flag.vue +0 -37
  374. package/nuxt/components/usage-example.vue +0 -32
  375. package/nuxt/composables/declension.ts +0 -124
  376. package/nuxt/composables/page-i18n.ts +0 -11
  377. package/nuxt/composables/page-meta.ts +0 -5
  378. package/nuxt/composables/route-utils.ts +0 -17
  379. package/nuxt/config.ts +0 -20
  380. package/nuxt/data/female-first-names.json +0 -556
  381. package/nuxt/data/male-first-names.json +0 -603
  382. package/nuxt/error.vue +0 -25
  383. package/nuxt/layouts/default.vue +0 -5
  384. package/nuxt/locales/en-US.json +0 -63
  385. package/nuxt/locales/uk-UA.json +0 -65
  386. package/nuxt/nuxt.config.ts +0 -99
  387. package/nuxt/package-lock.json +0 -19524
  388. package/nuxt/package.json +0 -37
  389. package/nuxt/pages/en-US/index.vue +0 -41
  390. package/nuxt/pages/index.vue +0 -68
  391. package/nuxt/plugins/i18n.ts +0 -26
  392. package/nuxt/public/.nojekyll +0 -0
  393. package/nuxt/public/CNAME +0 -1
  394. package/nuxt/public/android-icon-144x144.png +0 -0
  395. package/nuxt/public/android-icon-192x192.png +0 -0
  396. package/nuxt/public/android-icon-36x36.png +0 -0
  397. package/nuxt/public/android-icon-48x48.png +0 -0
  398. package/nuxt/public/android-icon-72x72.png +0 -0
  399. package/nuxt/public/android-icon-96x96.png +0 -0
  400. package/nuxt/public/apple-icon-114x114.png +0 -0
  401. package/nuxt/public/apple-icon-120x120.png +0 -0
  402. package/nuxt/public/apple-icon-144x144.png +0 -0
  403. package/nuxt/public/apple-icon-152x152.png +0 -0
  404. package/nuxt/public/apple-icon-180x180.png +0 -0
  405. package/nuxt/public/apple-icon-57x57.png +0 -0
  406. package/nuxt/public/apple-icon-60x60.png +0 -0
  407. package/nuxt/public/apple-icon-72x72.png +0 -0
  408. package/nuxt/public/apple-icon-76x76.png +0 -0
  409. package/nuxt/public/apple-icon-precomposed.png +0 -0
  410. package/nuxt/public/apple-icon.png +0 -0
  411. package/nuxt/public/browserconfig.xml +0 -2
  412. package/nuxt/public/favicon-16x16.png +0 -0
  413. package/nuxt/public/favicon-32x32.png +0 -0
  414. package/nuxt/public/favicon-96x96.png +0 -0
  415. package/nuxt/public/favicon.ico +0 -0
  416. package/nuxt/public/manifest.json +0 -41
  417. package/nuxt/public/ms-icon-144x144.png +0 -0
  418. package/nuxt/public/ms-icon-150x150.png +0 -0
  419. package/nuxt/public/ms-icon-310x310.png +0 -0
  420. package/nuxt/public/ms-icon-70x70.png +0 -0
  421. package/nuxt/public/preview-608x608.jpg +0 -0
  422. package/nuxt/scripts/postgenerate.js +0 -7
  423. package/nuxt/scripts/publish.js +0 -7
  424. package/nuxt/server/plugins/google-tag-manager.js +0 -37
  425. package/nuxt/tsconfig.json +0 -11
  426. package/src/anthroponym-inflection/anthroponym-inflector.ts +0 -38
  427. package/src/anthroponym-inflection/append-command-runner.ts +0 -18
  428. package/src/anthroponym-inflection/command-runner-factory.ts +0 -23
  429. package/src/anthroponym-inflection/first-name-inflector.ts +0 -41
  430. package/src/anthroponym-inflection/index.ts +0 -5
  431. package/src/anthroponym-inflection/inflector-command-runner.ts +0 -3
  432. package/src/anthroponym-inflection/inflector.types.ts +0 -42
  433. package/src/anthroponym-inflection/last-name-inflector.ts +0 -54
  434. package/src/anthroponym-inflection/middle-name-inflector.ts +0 -29
  435. package/src/anthroponym-inflection/name-inflector.ts +0 -19
  436. package/src/anthroponym-inflection/replace-command-runner.ts +0 -18
  437. package/src/core/anthroponym.interface.ts +0 -8
  438. package/src/core/gender.enum.ts +0 -4
  439. package/src/core/grammatical-case.enum.ts +0 -9
  440. package/src/core/index.ts +0 -4
  441. package/src/core/validator.ts +0 -39
  442. package/src/internal.ts +0 -1
  443. package/src/part-of-speech-recognition/index.ts +0 -5
  444. package/src/part-of-speech-recognition/neural-network-config.ts +0 -5
  445. package/src/part-of-speech-recognition/neural-network-training-data.ts +0 -5
  446. package/src/part-of-speech-recognition/neural-network.ts +0 -66
  447. package/src/part-of-speech-recognition/part-of-speech-decoder.ts +0 -26
  448. package/src/part-of-speech-recognition/part-of-speech-encoder.ts +0 -20
  449. package/src/part-of-speech-recognition/part-of-speech-recognition-rule.ts +0 -33
  450. package/src/part-of-speech-recognition/part-of-speech-recognizer.ts +0 -26
  451. package/src/part-of-speech-recognition/part-of-speech.enum.ts +0 -4
  452. package/src/part-of-speech-recognition/word-encoder.ts +0 -23
  453. package/src/part-of-speech-recognition/word-transformer.ts +0 -8
  454. package/src/resources/neural-networks/kosmii/README.md +0 -5
  455. package/src/resources/neural-networks/kosmii/cache.json +0 -8
  456. package/src/resources/neural-networks/kosmii/samples.json +0 -9435
  457. package/src/resources/neural-networks/kosmii/structure.json +0 -47898
  458. package/src/resources/neural-networks/pelykh/README.md +0 -5
  459. package/src/resources/neural-networks/pelykh/cache.json +0 -1
  460. package/src/resources/neural-networks/pelykh/samples.json +0 -221
  461. package/src/resources/neural-networks/pelykh/structure.json +0 -47898
  462. package/src/resources/neural-networks/pohorielova/README.md +0 -5
  463. package/src/resources/neural-networks/pohorielova/cache.json +0 -542
  464. package/src/resources/neural-networks/pohorielova/samples.json +0 -32147
  465. package/src/resources/neural-networks/pohorielova/structure.json +0 -47898
  466. package/src/utils/lang.utils.ts +0 -13
  467. package/src/utils/regexp.utils.ts +0 -11
  468. package/src/utils/string.utils.ts +0 -49
@@ -0,0 +1 @@
1
+ export * from './detect-gender';
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './shevchenko';
@@ -0,0 +1,80 @@
1
+ import { Anthroponym } from './anthroponym-declension';
2
+ import { DeclensionInput, GenderDetectionInput } from './contracts';
3
+ import { GrammaticalGender } from './language';
4
+
5
+ /**
6
+ * Validates if a given value is a valid input for declension.
7
+ *
8
+ * @throws {TypeError}
9
+ */
10
+ export function validateDeclensionInput(input: DeclensionInput): void {
11
+ validateObject(input);
12
+ validateGender(input.gender);
13
+ validateAnthroponym(input);
14
+ }
15
+
16
+ /**
17
+ * Validates if a given value is a valid input for gender detection.
18
+ *
19
+ * @throws {TypeError}
20
+ */
21
+ export function validateGenderDetectionInput(input: GenderDetectionInput): void {
22
+ validateObject(input);
23
+ validateAnthroponym(input);
24
+ }
25
+
26
+ /**
27
+ * Validates if a given value is an object.
28
+ *
29
+ * @throws {TypeError}
30
+ */
31
+ function validateObject(object: unknown): void {
32
+ if (typeof object !== 'object' || object == null) {
33
+ throw new TypeError('The input type must be an object.');
34
+ }
35
+ }
36
+
37
+ /**
38
+ * Validates if a given value is a valid grammatical gender.
39
+ *
40
+ * @throws {TypeError}
41
+ */
42
+ function validateGender(gender: GrammaticalGender): void {
43
+ if (![GrammaticalGender.MASCULINE, GrammaticalGender.FEMININE].includes(gender)) {
44
+ throw new TypeError(
45
+ `The "gender" parameter must be one of the following: "${GrammaticalGender.MASCULINE}", "${GrammaticalGender.FEMININE}".`,
46
+ );
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Validates if a given value is a valid anthroponym.
52
+ *
53
+ * @throws {TypeError}
54
+ */
55
+ function validateAnthroponym(anthroponym: Anthroponym): void {
56
+ if (
57
+ typeof anthroponym.givenName === 'undefined' &&
58
+ typeof anthroponym.patronymicName === 'undefined' &&
59
+ typeof anthroponym.familyName === 'undefined'
60
+ ) {
61
+ throw new TypeError(
62
+ 'At least one of the following parameters must present: "givenName", "patronymicName", "familyName".',
63
+ );
64
+ }
65
+
66
+ if (typeof anthroponym.givenName !== 'undefined' && typeof anthroponym.givenName !== 'string') {
67
+ throw new TypeError('The "givenName" parameter must be a string.');
68
+ }
69
+
70
+ if (
71
+ typeof anthroponym.patronymicName !== 'undefined' &&
72
+ typeof anthroponym.patronymicName !== 'string'
73
+ ) {
74
+ throw new TypeError('The "patronymicName" parameter must be a string.');
75
+ }
76
+
77
+ if (typeof anthroponym.familyName !== 'undefined' && typeof anthroponym.familyName !== 'string') {
78
+ throw new TypeError('The "familyName" parameter must be a string.');
79
+ }
80
+ }
@@ -0,0 +1,3 @@
1
+ # Language Module
2
+
3
+ This module provides data types and utilities that are related to the Ukrainian language and linguistics and can be used in other modules or applications.
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Ukrainian alphabet encoding where the key is the letter of the alphabet
3
+ * and the value is the order number of the corresponding letter starting from 1.
4
+ */
5
+ export enum AlphabetEncoding {
6
+ 'а' = 1,
7
+ 'б',
8
+ 'в',
9
+ 'г',
10
+ 'ґ',
11
+ 'д',
12
+ 'е',
13
+ 'є',
14
+ 'ж',
15
+ 'з',
16
+ 'и',
17
+ 'і',
18
+ 'ї',
19
+ 'й',
20
+ 'к',
21
+ 'л',
22
+ 'м',
23
+ 'н',
24
+ 'о',
25
+ 'п',
26
+ 'р',
27
+ 'с',
28
+ 'т',
29
+ 'у',
30
+ 'ф',
31
+ 'х',
32
+ 'ц',
33
+ 'ч',
34
+ 'ш',
35
+ 'щ',
36
+ 'ь',
37
+ 'ю',
38
+ 'я',
39
+ }
40
+
41
+ /**
42
+ * Size of Ukrainian alphabet.
43
+ */
44
+ export const ALPHABET_SIZE = 33;
45
+
46
+ /**
47
+ * Letter of Ukrainian alphabet.
48
+ */
49
+ export type Letter = keyof typeof AlphabetEncoding;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Enum representing the possible grammatical cases.
3
+ */
4
+ export enum GrammaticalCase {
5
+ NOMINATIVE = 'nominative',
6
+ GENITIVE = 'genitive',
7
+ DATIVE = 'dative',
8
+ ACCUSATIVE = 'accusative',
9
+ ABLATIVE = 'ablative',
10
+ LOCATIVE = 'locative',
11
+ VOCATIVE = 'vocative',
12
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Enum representing the possible grammatical genders.
3
+ */
4
+ export enum GrammaticalGender {
5
+ MASCULINE = 'masculine',
6
+ FEMININE = 'feminine',
7
+ }
@@ -0,0 +1,6 @@
1
+ export * from './alphabet';
2
+ export * from './word-class';
3
+ export * from './linguistics';
4
+ export * from './grammatical-case';
5
+ export * from './grammatical-gender';
6
+ export * from './letter-case';
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Copies a letter case pattern from a template word to a target word.
3
+ * Returns a modified target word in the letter case of the template word.
4
+ */
5
+ export function copyLetterCase(templateWord: string, targetWord: string): string {
6
+ let resultWord = '';
7
+
8
+ for (let index = 0; index < targetWord.length; index += 1) {
9
+ const templateLetter = templateWord[index] || templateWord[templateWord.length - 1];
10
+ const targetLetter = targetWord[index];
11
+ if (inLowerCase(templateLetter)) {
12
+ resultWord += targetLetter.toLowerCase();
13
+ } else if (inUpperCase(templateLetter)) {
14
+ resultWord += targetLetter.toUpperCase();
15
+ } else {
16
+ resultWord += targetLetter;
17
+ }
18
+ }
19
+
20
+ return resultWord;
21
+ }
22
+
23
+ /**
24
+ * Detects if a letter is in the upper case at the specified index.
25
+ */
26
+ function inUpperCase(word: string, index = 0): boolean {
27
+ return word.charAt(index) === word.charAt(index).toUpperCase();
28
+ }
29
+
30
+ /**
31
+ * Detects if a letter is in the lower case at the specified index.
32
+ */
33
+ function inLowerCase(word: string, index = 0): boolean {
34
+ return word.charAt(index) === word.charAt(index).toLowerCase();
35
+ }
@@ -0,0 +1,20 @@
1
+ export const PATTERN_VOWELS = /[аоуеиіяюєї]/gi;
2
+
3
+ /**
4
+ * Returns a number of syllables in a given word.
5
+ */
6
+ function countSyllables(word: string): number {
7
+ const matches = word.match(PATTERN_VOWELS);
8
+ if (matches == null) {
9
+ return 0;
10
+ }
11
+ return matches.length;
12
+ }
13
+
14
+ /**
15
+ * Returns true if a given word is a monosyllable.
16
+ * Returns false otherwise.
17
+ */
18
+ export function isMonosyllable(word: string): boolean {
19
+ return countSyllables(word) === 1;
20
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Enum representing the possible grammatical word classes (also known as part of speech).
3
+ */
4
+ export enum WordClass {
5
+ NOUN = 'noun',
6
+ ADJECTIVE = 'adjective',
7
+ }
package/src/shevchenko.ts CHANGED
@@ -1,63 +1,95 @@
1
- import { Anthroponym, Gender, GrammaticalCase, validateAnthroponym } from './core';
2
1
  import { anthroponymInflector } from './bootstrap';
2
+ import {
3
+ DeclensionInput,
4
+ DeclensionOutput,
5
+ GenderDetectionInput,
6
+ GenderDetectionOutput,
7
+ } from './contracts';
8
+ import { detectGender as autoDetectGender } from './gender-detection';
9
+ import { validateDeclensionInput, validateGenderDetectionInput } from './input-validation';
10
+ import { GrammaticalCase } from './language';
11
+
12
+ export * from './contracts';
13
+ export { GrammaticalGender, GrammaticalCase } from './language';
14
+ export { Anthroponym } from './anthroponym-declension';
3
15
 
4
16
  /**
5
- * Inflects the anthroponym in nominative grammatical case.
17
+ * Inflects an anthroponym in nominative grammatical case.
18
+ *
19
+ * @throws {TypeError} Input validation error.
6
20
  */
7
- export function inNominative(anthroponym: Anthroponym): Anthroponym {
8
- validateAnthroponym(anthroponym);
9
- return anthroponymInflector.inflect(anthroponym, GrammaticalCase.Nominative);
21
+ export async function inNominative(input: DeclensionInput): Promise<DeclensionOutput> {
22
+ validateDeclensionInput(input);
23
+ return anthroponymInflector.inflect(input, input.gender, GrammaticalCase.NOMINATIVE);
10
24
  }
11
25
 
12
26
  /**
13
- * Inflects the anthroponym in genitive grammatical case.
27
+ * Inflects an anthroponym in genitive grammatical case.
28
+ *
29
+ * @throws {TypeError} Input validation error.
14
30
  */
15
- export function inGenitive(anthroponym: Anthroponym): Anthroponym {
16
- validateAnthroponym(anthroponym);
17
- return anthroponymInflector.inflect(anthroponym, GrammaticalCase.Genitive);
31
+ export async function inGenitive(input: DeclensionInput): Promise<DeclensionOutput> {
32
+ validateDeclensionInput(input);
33
+ return anthroponymInflector.inflect(input, input.gender, GrammaticalCase.GENITIVE);
18
34
  }
19
35
 
20
36
  /**
21
- * Inflects the anthroponym in dative grammatical case.
37
+ * Inflects an anthroponym in dative grammatical case.
38
+ *
39
+ * @throws {TypeError} Input validation error.
22
40
  */
23
- export function inDative(anthroponym: Anthroponym): Anthroponym {
24
- validateAnthroponym(anthroponym);
25
- return anthroponymInflector.inflect(anthroponym, GrammaticalCase.Dative);
41
+ export async function inDative(input: DeclensionInput): Promise<DeclensionOutput> {
42
+ validateDeclensionInput(input);
43
+ return anthroponymInflector.inflect(input, input.gender, GrammaticalCase.DATIVE);
26
44
  }
27
45
 
28
46
  /**
29
- * Inflects the anthroponym in accusative grammatical case.
47
+ * Inflects an anthroponym in accusative grammatical case.
48
+ *
49
+ * @throws {TypeError} Input validation error.
30
50
  */
31
- export function inAccusative(anthroponym: Anthroponym): Anthroponym {
32
- validateAnthroponym(anthroponym);
33
- return anthroponymInflector.inflect(anthroponym, GrammaticalCase.Accusative);
51
+ export async function inAccusative(input: DeclensionInput): Promise<DeclensionOutput> {
52
+ validateDeclensionInput(input);
53
+ return anthroponymInflector.inflect(input, input.gender, GrammaticalCase.ACCUSATIVE);
34
54
  }
35
55
 
36
56
  /**
37
- * Inflects the anthroponym in ablative grammatical case.
57
+ * Inflects an anthroponym in ablative grammatical case.
58
+ *
59
+ * @throws {TypeError} Input validation error.
38
60
  */
39
- export function inAblative(anthroponym: Anthroponym): Anthroponym {
40
- validateAnthroponym(anthroponym);
41
- return anthroponymInflector.inflect(anthroponym, GrammaticalCase.Ablative);
61
+ export async function inAblative(input: DeclensionInput): Promise<DeclensionOutput> {
62
+ validateDeclensionInput(input);
63
+ return anthroponymInflector.inflect(input, input.gender, GrammaticalCase.ABLATIVE);
42
64
  }
43
65
 
44
66
  /**
45
- * Inflects the anthroponym in locative grammatical case.
67
+ * Inflects an anthroponym in locative grammatical case.
68
+ *
69
+ * @throws {TypeError} Input validation error.
46
70
  */
47
- export function inLocative(anthroponym: Anthroponym): Anthroponym {
48
- validateAnthroponym(anthroponym);
49
- return anthroponymInflector.inflect(anthroponym, GrammaticalCase.Locative);
71
+ export async function inLocative(input: DeclensionInput): Promise<DeclensionOutput> {
72
+ validateDeclensionInput(input);
73
+ return anthroponymInflector.inflect(input, input.gender, GrammaticalCase.LOCATIVE);
50
74
  }
51
75
 
52
76
  /**
53
- * Inflects the anthroponym in vocative grammatical case.
77
+ * Inflects an anthroponym in vocative grammatical case.
78
+ *
79
+ * @throws {TypeError} Input validation error.
54
80
  */
55
- export function inVocative(anthroponym: Anthroponym): Anthroponym {
56
- validateAnthroponym(anthroponym);
57
- return anthroponymInflector.inflect(anthroponym, GrammaticalCase.Vocative);
81
+ export async function inVocative(input: DeclensionInput): Promise<DeclensionOutput> {
82
+ validateDeclensionInput(input);
83
+ return anthroponymInflector.inflect(input, input.gender, GrammaticalCase.VOCATIVE);
58
84
  }
59
85
 
60
- export { Anthroponym, Gender };
61
-
62
- // Not a part of public API.
63
- export * as Internal from './internal';
86
+ /**
87
+ * Returns the grammatical gender of an anthroponym.
88
+ * Returns null if the grammatical gender cannot be detected.
89
+ *
90
+ * @throws {TypeError} Input validation error.
91
+ */
92
+ export async function detectGender(input: GenderDetectionInput): Promise<GenderDetectionOutput> {
93
+ validateGenderDetectionInput(input);
94
+ return autoDetectGender(input);
95
+ }
@@ -0,0 +1,5 @@
1
+ # Word Class Recoginition Module
2
+
3
+ This module implements part of speech (also known as word class) recognition of Ukrainian family names.
4
+
5
+ The word class recognition is performed by [TensorFlow](https://www.tensorflow.org/js) model trained on more than 40K Ukrainian family names. The dataset consists of feminine family names ending in `-a`, `-я` and masculine family names ending in `-их`, `-ой`, `-ий`, `-ій`.
@@ -0,0 +1,7 @@
1
+ {
2
+ "modelInfo": {"dateSaved":"2023-02-16T00:14:42.753Z","modelTopologyType":"JSON","modelTopologyBytes":1659,"weightSpecsBytes":428,"weightDataBytes":4356},
3
+ "modelMetadata": {"format":"layers-model","generatedBy":"TensorFlow.js tfjs-layers v4.2.0","convertedBy":null},
4
+ "modelTopology": {"class_name":"Sequential","config":{"name":"sequential_1","layers":[{"class_name":"Embedding","config":{"input_dim":34,"output_dim":16,"embeddings_initializer":{"class_name":"RandomUniform","config":{"minval":-0.05,"maxval":0.05,"seed":null}},"embeddings_regularizer":null,"activity_regularizer":null,"embeddings_constraint":null,"mask_zero":null,"input_length":null,"name":"embedding_Embedding1","trainable":true,"batch_input_shape":[null,null]}},{"class_name":"SimpleRNN","config":{"name":"simple_rnn_SimpleRNN1","trainable":true,"units":16,"activation":"relu","use_bias":true,"kernel_initializer":{"class_name":"VarianceScaling","config":{"scale":1,"mode":"fan_avg","distribution":"normal","seed":null}},"recurrent_initializer":{"class_name":"Orthogonal","config":{"gain":1,"seed":null}},"bias_initializer":{"class_name":"Zeros","config":{}},"kernel_regularizer":null,"recurrent_regularizer":null,"bias_regularizer":null,"activity_regularizer":null,"kernel_constraint":null,"recurrent_constraint":null,"bias_constraint":null,"dropout":0,"recurrent_dropout":0,"return_sequences":false,"return_state":false,"go_backwards":false,"stateful":false,"unroll":false}},{"class_name":"Dense","config":{"units":1,"activation":"sigmoid","use_bias":true,"kernel_initializer":{"class_name":"VarianceScaling","config":{"scale":1,"mode":"fan_avg","distribution":"normal","seed":null}},"bias_initializer":{"class_name":"Zeros","config":{}},"kernel_regularizer":null,"bias_regularizer":null,"activity_regularizer":null,"kernel_constraint":null,"bias_constraint":null,"name":"dense_Dense1","trainable":true}}]},"keras_version":"tfjs-layers 4.2.0","backend":"tensor_flow.js"},
5
+ "weightSpecs": [{"name":"embedding_Embedding1/embeddings","shape":[34,16],"dtype":"float32"},{"name":"simple_rnn_SimpleRNN1/kernel","shape":[16,16],"dtype":"float32"},{"name":"simple_rnn_SimpleRNN1/recurrent_kernel","shape":[16,16],"dtype":"float32"},{"name":"simple_rnn_SimpleRNN1/bias","shape":[16],"dtype":"float32"},{"name":"dense_Dense1/kernel","shape":[16,1],"dtype":"float32"},{"name":"dense_Dense1/bias","shape":[1],"dtype":"float32"}],
6
+ "weightData": "Rev2O4TTez1kUwc88DqSvNfOwbwpkKa968xWvRNKmr2N4+A8hyCoPY6JdL3vIBs9qHocvU8CGT17MHS7HhBEPKUmuL3r0yY+aEMgPlNqtr4pr2e9M7vSvNTd4zxNxx4+LQ8LPuaMxLzwOrk9RC9EPFuAP73UrYG+b92fPhBUSj1cUfc9/ndWvsEEGb0RBXA+QhOjPByI1D1vhl4+LoeyvZ7vyL0TDXs91DjUvUTsDT65EvE9dIFlPvW0jr7cSJg9IXfivds5Wj532Bg+pMwTvmfIT72XqOK9i8wzvklY4z1bQ2k+hPk1vrsK1z36Mzm+FXuHPf1IB75bUEs+8uJrvpF3ND4MPdK9nOM1PWNHVz4v+mI+ErWJPdJBQD5bf5y+8X9ovVknEz6rQD2+IF+SPenzGD5+p2M+dJluvnAnGz5gEIO9qj0WPVSooz3Y14i828MVPvTcJ7yenHw8VqWjPRbm77xfGps8SdZEvRTk7T0PykI8U7O/Pcd+3L0a8Rk+vpoqPm6CA75k6+q9aAx4PtqgST1iqyc++Xs2Pv2mHL74lBO+1Y5iPvJiQ75R6zo+AdYZPmvdWD41SYK+5yUoPqRQVb18txu+Yx7MPb72rb2CIA+99/RavS5JAz4ZFQU98KCnvbstFL2sraq8VI0YvVMQk70ssbK96HoHvJrmiz2wE0I+Ce/1PVc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9iXYZPgK3Ar7qKsO+Bj5nvmVfWz66AdA8oUidPrIyiz653sw9UNmiPm1OuT5icEK+/qfOPf0sJb6K2Cc/2nyYvuPJAb5XwZO+unOPPmAQlb3WqKo9AsmbPvQTar5sLty+Bc5FPpRQPj60X3A+/BULPuL56j2mP9I8pWC9vLWnmL6HWdM+MkuBPMSA9j4E6oi+i9FNvnyikL4N1Y2+vuGwPlIFFT7lH4C83H9hPbUvbzykqLG9MQ38vRyFI79ZLvW9Chr7POaTJr5bAyQ+DlzWPip4uD7Dds8+GA2Pvfuvuz5u3JG+0ccTvNbU9710QGu+U21iPg2+HD7t1V++J38PPtCkyT4fIog957lUPuePxL6jwnE+6YYivmUnzbzZnQi+u1fvPrzNaL3NIIC+oJqaPAyq3b60POQ+7MvlPYSzHTgX0yE5d3ehvg0Eoj5PLqg9prQ+vqj8ED4hj5A+cboOvqsUkb5mo0e+UFifvoB8Gz20dnA94yMJv8Xodz2qd6S9w8mWPRKBhL5WYii936hRPQ8frr51WgO+k/mJPhEutD4lUxo+ZNymvhrPjT68bGs9cpM7u4tlZ771vnU+2nFrPn0AHD+Tdb8+nYMcPrx21z5sUxK+C4fYPf6ZXD1rMWy+aqQlPTPgkD09ZIg9MDp/PcqDXL0R9aU9XqdoPWEQyT0D9lu9FcO8PRrJ9DwIOY69B2JPvYDFDz0+uG68otIsvZsEob6X3zC/QJaMPjIHt77nx2A8hkmDvshTuT4IGsi+hkTHPrjHWz95tTM/zsQcvI1Q0z7L31m+yhsAv1PRRr0KiwC9"
7
+ }
@@ -0,0 +1 @@
1
+ {"modelTopology":{"class_name":"Sequential","config":{"name":"sequential_1","layers":[{"class_name":"Embedding","config":{"input_dim":34,"output_dim":16,"embeddings_initializer":{"class_name":"RandomUniform","config":{"minval":-0.05,"maxval":0.05,"seed":null}},"embeddings_regularizer":null,"activity_regularizer":null,"embeddings_constraint":null,"mask_zero":null,"input_length":null,"name":"embedding_Embedding1","trainable":true,"batch_input_shape":[null,null]}},{"class_name":"SimpleRNN","config":{"name":"simple_rnn_SimpleRNN1","trainable":true,"units":16,"activation":"relu","use_bias":true,"kernel_initializer":{"class_name":"VarianceScaling","config":{"scale":1,"mode":"fan_avg","distribution":"normal","seed":null}},"recurrent_initializer":{"class_name":"Orthogonal","config":{"gain":1,"seed":null}},"bias_initializer":{"class_name":"Zeros","config":{}},"kernel_regularizer":null,"recurrent_regularizer":null,"bias_regularizer":null,"activity_regularizer":null,"kernel_constraint":null,"recurrent_constraint":null,"bias_constraint":null,"dropout":0,"recurrent_dropout":0,"return_sequences":false,"return_state":false,"go_backwards":false,"stateful":false,"unroll":false}},{"class_name":"Dense","config":{"units":1,"activation":"sigmoid","use_bias":true,"kernel_initializer":{"class_name":"VarianceScaling","config":{"scale":1,"mode":"fan_avg","distribution":"normal","seed":null}},"bias_initializer":{"class_name":"Zeros","config":{}},"kernel_regularizer":null,"bias_regularizer":null,"activity_regularizer":null,"kernel_constraint":null,"bias_constraint":null,"name":"dense_Dense1","trainable":true}}]},"keras_version":"tfjs-layers 4.2.0","backend":"tensor_flow.js"},"weightsManifest":[{"paths":["weights.bin"],"weights":[{"name":"embedding_Embedding1/embeddings","shape":[34,16],"dtype":"float32"},{"name":"simple_rnn_SimpleRNN1/kernel","shape":[16,16],"dtype":"float32"},{"name":"simple_rnn_SimpleRNN1/recurrent_kernel","shape":[16,16],"dtype":"float32"},{"name":"simple_rnn_SimpleRNN1/bias","shape":[16],"dtype":"float32"},{"name":"dense_Dense1/kernel","shape":[16,1],"dtype":"float32"},{"name":"dense_Dense1/bias","shape":[1],"dtype":"float32"}]}],"format":"layers-model","generatedBy":"TensorFlow.js tfjs-layers v4.2.0","convertedBy":null}