shevchenko 2.1.0 → 2.1.2

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 (134) hide show
  1. package/dist/cjs/shevchenko.js +121 -32
  2. package/dist/cjs/shevchenko.js.map +1 -1
  3. package/dist/es/shevchenko.js +121 -32
  4. package/dist/es/shevchenko.js.map +1 -1
  5. package/dist/umd/shevchenko.min.js +3 -3
  6. package/dist/umd/shevchenko.min.js.map +1 -1
  7. package/nuxt/.eslintrc.json +27 -0
  8. package/nuxt/.prettierrc.json +6 -0
  9. package/nuxt/README.md +27 -0
  10. package/nuxt/app.config.ts +3 -0
  11. package/nuxt/app.vue +5 -0
  12. package/nuxt/assets/img/shevchenko_pixelized_304x304.jpg +0 -0
  13. package/nuxt/assets/img/shevchenko_pixelized_304x304.png +0 -0
  14. package/nuxt/assets/img/shevchenko_pixelized_608x608.jpg +0 -0
  15. package/nuxt/assets/style/main.scss +3 -0
  16. package/nuxt/components/about-modal.vue +58 -0
  17. package/nuxt/components/api-spec.vue +25 -0
  18. package/nuxt/components/contact-me-button.vue +11 -0
  19. package/nuxt/components/contact-me-modal.vue +63 -0
  20. package/nuxt/components/copy-button.vue +38 -0
  21. package/nuxt/components/declension-demo.vue +32 -0
  22. package/nuxt/components/declension-form.vue +91 -0
  23. package/nuxt/components/declension-preview.vue +170 -0
  24. package/nuxt/components/declension-results.vue +116 -0
  25. package/nuxt/components/error-404.vue +15 -0
  26. package/nuxt/components/github-issue-count.vue +18 -0
  27. package/nuxt/components/how-it-works.vue +51 -0
  28. package/nuxt/components/installation-instructions.vue +33 -0
  29. package/nuxt/components/library-docs.vue +27 -0
  30. package/nuxt/components/page-copyright.vue +15 -0
  31. package/nuxt/components/page-footer.vue +32 -0
  32. package/nuxt/components/page-header.vue +4 -0
  33. package/nuxt/components/preview-banner.vue +32 -0
  34. package/nuxt/components/share-links.vue +108 -0
  35. package/nuxt/components/top-nav-bar.vue +165 -0
  36. package/nuxt/components/ukrainian-flag.vue +37 -0
  37. package/nuxt/components/usage-example.vue +32 -0
  38. package/nuxt/composables/declension.ts +81 -0
  39. package/nuxt/composables/page-i18n.ts +11 -0
  40. package/nuxt/composables/page-meta.ts +5 -0
  41. package/nuxt/composables/route-utils.ts +17 -0
  42. package/nuxt/config.ts +20 -0
  43. package/nuxt/error.vue +25 -0
  44. package/nuxt/layouts/default.vue +5 -0
  45. package/nuxt/locales/en-US.json +60 -0
  46. package/nuxt/locales/uk-UA.json +62 -0
  47. package/nuxt/nuxt.config.ts +99 -0
  48. package/nuxt/package-lock.json +19524 -0
  49. package/nuxt/package.json +37 -0
  50. package/nuxt/pages/en-US/index.vue +41 -0
  51. package/nuxt/pages/index.vue +68 -0
  52. package/nuxt/plugins/i18n.ts +26 -0
  53. package/nuxt/public/.nojekyll +0 -0
  54. package/nuxt/public/CNAME +1 -0
  55. package/nuxt/public/android-icon-144x144.png +0 -0
  56. package/nuxt/public/android-icon-192x192.png +0 -0
  57. package/nuxt/public/android-icon-36x36.png +0 -0
  58. package/nuxt/public/android-icon-48x48.png +0 -0
  59. package/nuxt/public/android-icon-72x72.png +0 -0
  60. package/nuxt/public/android-icon-96x96.png +0 -0
  61. package/nuxt/public/apple-icon-114x114.png +0 -0
  62. package/nuxt/public/apple-icon-120x120.png +0 -0
  63. package/nuxt/public/apple-icon-144x144.png +0 -0
  64. package/nuxt/public/apple-icon-152x152.png +0 -0
  65. package/nuxt/public/apple-icon-180x180.png +0 -0
  66. package/nuxt/public/apple-icon-57x57.png +0 -0
  67. package/nuxt/public/apple-icon-60x60.png +0 -0
  68. package/nuxt/public/apple-icon-72x72.png +0 -0
  69. package/nuxt/public/apple-icon-76x76.png +0 -0
  70. package/nuxt/public/apple-icon-precomposed.png +0 -0
  71. package/nuxt/public/apple-icon.png +0 -0
  72. package/nuxt/public/browserconfig.xml +2 -0
  73. package/nuxt/public/favicon-16x16.png +0 -0
  74. package/nuxt/public/favicon-32x32.png +0 -0
  75. package/nuxt/public/favicon-96x96.png +0 -0
  76. package/nuxt/public/favicon.ico +0 -0
  77. package/nuxt/public/manifest.json +41 -0
  78. package/nuxt/public/ms-icon-144x144.png +0 -0
  79. package/nuxt/public/ms-icon-150x150.png +0 -0
  80. package/nuxt/public/ms-icon-310x310.png +0 -0
  81. package/nuxt/public/ms-icon-70x70.png +0 -0
  82. package/nuxt/public/preview-608x608.jpg +0 -0
  83. package/nuxt/scripts/postgenerate.js +7 -0
  84. package/nuxt/scripts/publish.js +7 -0
  85. package/nuxt/server/plugins/google-tag-manager.js +37 -0
  86. package/nuxt/tsconfig.json +11 -0
  87. package/package.json +3 -2
  88. package/src/anthroponym-inflection/anthroponym-inflector.ts +38 -0
  89. package/src/anthroponym-inflection/append-command-runner.ts +18 -0
  90. package/src/anthroponym-inflection/command-runner-factory.ts +23 -0
  91. package/src/anthroponym-inflection/first-name-inflector.ts +41 -0
  92. package/src/anthroponym-inflection/index.ts +5 -0
  93. package/src/anthroponym-inflection/inflector-command-runner.ts +3 -0
  94. package/src/anthroponym-inflection/inflector.types.ts +42 -0
  95. package/src/anthroponym-inflection/last-name-inflector.ts +54 -0
  96. package/src/anthroponym-inflection/middle-name-inflector.ts +29 -0
  97. package/src/anthroponym-inflection/name-inflector.ts +19 -0
  98. package/src/anthroponym-inflection/replace-command-runner.ts +18 -0
  99. package/src/anthroponym-inflection/rule-inflector.ts +40 -0
  100. package/src/bootstrap.ts +53 -0
  101. package/src/core/anthroponym.interface.ts +8 -0
  102. package/src/core/gender.enum.ts +4 -0
  103. package/src/core/grammatical-case.enum.ts +9 -0
  104. package/src/core/index.ts +4 -0
  105. package/src/core/validator.ts +39 -0
  106. package/src/internal.ts +1 -0
  107. package/src/part-of-speech-recognition/index.ts +5 -0
  108. package/src/part-of-speech-recognition/neural-network-config.ts +5 -0
  109. package/src/part-of-speech-recognition/neural-network-training-data.ts +5 -0
  110. package/src/part-of-speech-recognition/neural-network.ts +66 -0
  111. package/src/part-of-speech-recognition/part-of-speech-decoder.ts +26 -0
  112. package/src/part-of-speech-recognition/part-of-speech-encoder.ts +20 -0
  113. package/src/part-of-speech-recognition/part-of-speech-recognition-rule.ts +33 -0
  114. package/src/part-of-speech-recognition/part-of-speech-recognizer.ts +26 -0
  115. package/src/part-of-speech-recognition/part-of-speech.enum.ts +4 -0
  116. package/src/part-of-speech-recognition/word-encoder.ts +23 -0
  117. package/src/part-of-speech-recognition/word-transformer.ts +8 -0
  118. package/src/resources/inflector/rules.json +7202 -0
  119. package/src/resources/neural-networks/kosmii/README.md +5 -0
  120. package/src/resources/neural-networks/kosmii/cache.json +8 -0
  121. package/src/resources/neural-networks/kosmii/samples.json +9435 -0
  122. package/src/resources/neural-networks/kosmii/structure.json +47898 -0
  123. package/src/resources/neural-networks/pelykh/README.md +5 -0
  124. package/src/resources/neural-networks/pelykh/cache.json +1 -0
  125. package/src/resources/neural-networks/pelykh/samples.json +221 -0
  126. package/src/resources/neural-networks/pelykh/structure.json +47898 -0
  127. package/src/resources/neural-networks/pohorielova/README.md +5 -0
  128. package/src/resources/neural-networks/pohorielova/cache.json +542 -0
  129. package/src/resources/neural-networks/pohorielova/samples.json +32147 -0
  130. package/src/resources/neural-networks/pohorielova/structure.json +47898 -0
  131. package/src/shevchenko.ts +63 -0
  132. package/src/utils/lang.utils.ts +13 -0
  133. package/src/utils/regexp.utils.ts +11 -0
  134. package/src/utils/string.utils.ts +49 -0
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @file JavaScript library for declension of Ukrainian anthroponyms
3
3
  * @module shevchenko
4
- * @version 2.1.0
4
+ * @version 2.1.1
5
5
  * @author Oleksandr Tolochko <tooleks@gmail.com>
6
6
  * @license MIT
7
- * @copyright 2022 Oleksandr Tolochko <tooleks@gmail.com>
7
+ * @copyright 2023 Oleksandr Tolochko <tooleks@gmail.com>
8
8
  * @see {@link git+https://github.com/tooleks/shevchenko-js.git}
9
9
  */
10
10
  'use strict';
@@ -910,9 +910,9 @@ var inflectorRules = [
910
910
  }
911
911
  },
912
912
  {
913
- description: "друга відміна / чоловічий рід / м'яка група / на -(голосна)вень",
913
+ description: "друга відміна / чоловічий рід / м'яка група / стрілець",
914
914
  examples: [
915
- "півень"
915
+ "стрілець"
916
916
  ],
917
917
  partOfSpeech: "noun",
918
918
  gender: [
@@ -922,7 +922,7 @@ var inflectorRules = [
922
922
  usage: [
923
923
  ],
924
924
  pattern: {
925
- find: "(а|е|є|и|і|ї|о|у|ю|я)вень$",
925
+ find: "стрілець$",
926
926
  modify: "(.{1})(.{1})(.{1})$"
927
927
  },
928
928
  grammaticalCases: {
@@ -932,7 +932,7 @@ var inflectorRules = [
932
932
  {
933
933
  "0": {
934
934
  type: "replace",
935
- value: ""
935
+ value: "ь"
936
936
  },
937
937
  "2": {
938
938
  type: "replace",
@@ -944,7 +944,7 @@ var inflectorRules = [
944
944
  {
945
945
  "0": {
946
946
  type: "replace",
947
- value: ""
947
+ value: "ь"
948
948
  },
949
949
  "2": {
950
950
  type: "replace",
@@ -954,7 +954,7 @@ var inflectorRules = [
954
954
  {
955
955
  "0": {
956
956
  type: "replace",
957
- value: ""
957
+ value: "ь"
958
958
  },
959
959
  "2": {
960
960
  type: "replace",
@@ -966,7 +966,7 @@ var inflectorRules = [
966
966
  {
967
967
  "0": {
968
968
  type: "replace",
969
- value: ""
969
+ value: "ь"
970
970
  },
971
971
  "2": {
972
972
  type: "replace",
@@ -978,7 +978,7 @@ var inflectorRules = [
978
978
  {
979
979
  "0": {
980
980
  type: "replace",
981
- value: ""
981
+ value: "ь"
982
982
  },
983
983
  "2": {
984
984
  type: "replace",
@@ -990,21 +990,21 @@ var inflectorRules = [
990
990
  {
991
991
  "0": {
992
992
  type: "replace",
993
- value: ""
993
+ value: "ь"
994
994
  },
995
995
  "2": {
996
996
  type: "replace",
997
- value: "еві"
997
+ value: "ю"
998
998
  }
999
999
  },
1000
1000
  {
1001
1001
  "0": {
1002
1002
  type: "replace",
1003
- value: ""
1003
+ value: "ь"
1004
1004
  },
1005
1005
  "2": {
1006
1006
  type: "replace",
1007
- value: "ю"
1007
+ value: "еві"
1008
1008
  }
1009
1009
  }
1010
1010
  ],
@@ -1012,7 +1012,7 @@ var inflectorRules = [
1012
1012
  {
1013
1013
  "0": {
1014
1014
  type: "replace",
1015
- value: ""
1015
+ value: "ь"
1016
1016
  },
1017
1017
  "2": {
1018
1018
  type: "replace",
@@ -1023,9 +1023,9 @@ var inflectorRules = [
1023
1023
  }
1024
1024
  },
1025
1025
  {
1026
- description: "друга відміна / чоловічий рід / м'яка група / на -(голосна)лець",
1026
+ description: "друга відміна / чоловічий рід / м'яка група / на -(голосна)вень",
1027
1027
  examples: [
1028
- "стрілець"
1028
+ "півень"
1029
1029
  ],
1030
1030
  partOfSpeech: "noun",
1031
1031
  gender: [
@@ -1035,7 +1035,7 @@ var inflectorRules = [
1035
1035
  usage: [
1036
1036
  ],
1037
1037
  pattern: {
1038
- find: "(а|е|є|и|і|ї|о|у|ю|я)лець$",
1038
+ find: "(а|е|є|и|і|ї|о|у|ю|я)вень$",
1039
1039
  modify: "(.{1})(.{1})(.{1})$"
1040
1040
  },
1041
1041
  grammaticalCases: {
@@ -1045,7 +1045,7 @@ var inflectorRules = [
1045
1045
  {
1046
1046
  "0": {
1047
1047
  type: "replace",
1048
- value: "ь"
1048
+ value: ""
1049
1049
  },
1050
1050
  "2": {
1051
1051
  type: "replace",
@@ -1057,7 +1057,7 @@ var inflectorRules = [
1057
1057
  {
1058
1058
  "0": {
1059
1059
  type: "replace",
1060
- value: "ь"
1060
+ value: ""
1061
1061
  },
1062
1062
  "2": {
1063
1063
  type: "replace",
@@ -1067,7 +1067,7 @@ var inflectorRules = [
1067
1067
  {
1068
1068
  "0": {
1069
1069
  type: "replace",
1070
- value: "ь"
1070
+ value: ""
1071
1071
  },
1072
1072
  "2": {
1073
1073
  type: "replace",
@@ -1079,7 +1079,7 @@ var inflectorRules = [
1079
1079
  {
1080
1080
  "0": {
1081
1081
  type: "replace",
1082
- value: "ь"
1082
+ value: ""
1083
1083
  },
1084
1084
  "2": {
1085
1085
  type: "replace",
@@ -1091,7 +1091,7 @@ var inflectorRules = [
1091
1091
  {
1092
1092
  "0": {
1093
1093
  type: "replace",
1094
- value: "ь"
1094
+ value: ""
1095
1095
  },
1096
1096
  "2": {
1097
1097
  type: "replace",
@@ -1103,21 +1103,21 @@ var inflectorRules = [
1103
1103
  {
1104
1104
  "0": {
1105
1105
  type: "replace",
1106
- value: "ь"
1106
+ value: ""
1107
1107
  },
1108
1108
  "2": {
1109
1109
  type: "replace",
1110
- value: "ю"
1110
+ value: "еві"
1111
1111
  }
1112
1112
  },
1113
1113
  {
1114
1114
  "0": {
1115
1115
  type: "replace",
1116
- value: "ь"
1116
+ value: ""
1117
1117
  },
1118
1118
  "2": {
1119
1119
  type: "replace",
1120
- value: "еві"
1120
+ value: "ю"
1121
1121
  }
1122
1122
  }
1123
1123
  ],
@@ -1125,7 +1125,7 @@ var inflectorRules = [
1125
1125
  {
1126
1126
  "0": {
1127
1127
  type: "replace",
1128
- value: "ь"
1128
+ value: ""
1129
1129
  },
1130
1130
  "2": {
1131
1131
  type: "replace",
@@ -2698,7 +2698,7 @@ var inflectorRules = [
2698
2698
  }
2699
2699
  },
2700
2700
  {
2701
- description: "друга відміна / чоловічий рід / м'яка група / на -.бідь",
2701
+ description: "друга відміна / чоловічий рід / м'яка група / на -бідь",
2702
2702
  examples: [
2703
2703
  "лебідь"
2704
2704
  ],
@@ -2811,7 +2811,7 @@ var inflectorRules = [
2811
2811
  }
2812
2812
  },
2813
2813
  {
2814
- description: "друга відміна / чоловічий рід / м'яка група / на -.мінь",
2814
+ description: "друга відміна / чоловічий рід / м'яка група / на -мінь",
2815
2815
  examples: [
2816
2816
  "кремінь"
2817
2817
  ],
@@ -3606,7 +3606,7 @@ var inflectorRules = [
3606
3606
  }
3607
3607
  },
3608
3608
  {
3609
- description: "друга відміна / чоловічий рід / тверда група / на -.ків",
3609
+ description: "друга відміна / чоловічий рід / тверда група / на -ків",
3610
3610
  examples: [
3611
3611
  "яків"
3612
3612
  ],
@@ -3719,7 +3719,7 @@ var inflectorRules = [
3719
3719
  }
3720
3720
  },
3721
3721
  {
3722
- description: "друга відміна / чоловічий рід / тверда група / на -.(к|р)іп",
3722
+ description: "друга відміна / чоловічий рід / тверда група / на -(к|р)іп",
3723
3723
  examples: [
3724
3724
  "прокіп"
3725
3725
  ],
@@ -6038,6 +6038,95 @@ var inflectorRules = [
6038
6038
  ]
6039
6039
  }
6040
6040
  },
6041
+ {
6042
+ description: "чоловічі по батькові та прізвища / на -іч",
6043
+ examples: [
6044
+ "ілліч"
6045
+ ],
6046
+ partOfSpeech: "noun",
6047
+ gender: [
6048
+ "male"
6049
+ ],
6050
+ priority: 2,
6051
+ usage: [
6052
+ "middleName",
6053
+ "lastName"
6054
+ ],
6055
+ pattern: {
6056
+ find: "іч$",
6057
+ modify: "(.{1})$"
6058
+ },
6059
+ grammaticalCases: {
6060
+ nominative: [
6061
+ ],
6062
+ genitive: [
6063
+ {
6064
+ "0": {
6065
+ type: "append",
6066
+ value: "а"
6067
+ }
6068
+ }
6069
+ ],
6070
+ dative: [
6071
+ {
6072
+ "0": {
6073
+ type: "append",
6074
+ value: "у"
6075
+ }
6076
+ },
6077
+ {
6078
+ "0": {
6079
+ type: "append",
6080
+ value: "еві"
6081
+ }
6082
+ }
6083
+ ],
6084
+ accusative: [
6085
+ {
6086
+ "0": {
6087
+ type: "append",
6088
+ value: "а"
6089
+ }
6090
+ }
6091
+ ],
6092
+ ablative: [
6093
+ {
6094
+ "0": {
6095
+ type: "append",
6096
+ value: "ем"
6097
+ }
6098
+ }
6099
+ ],
6100
+ locative: [
6101
+ {
6102
+ "0": {
6103
+ type: "append",
6104
+ value: "і"
6105
+ }
6106
+ },
6107
+ {
6108
+ "0": {
6109
+ type: "append",
6110
+ value: "у"
6111
+ }
6112
+ },
6113
+ {
6114
+ "0": {
6115
+ type: "append",
6116
+ value: "еві"
6117
+ }
6118
+ }
6119
+ ],
6120
+ vocative: [
6121
+ {
6122
+ "0": {
6123
+ type: "append",
6124
+ value: "у"
6125
+ }
6126
+ }
6127
+ ]
6128
+ }
6129
+ },
6041
6130
  {
6042
6131
  description: "жіночі по батькові / на -на",
6043
6132
  examples: [