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
  import synaptic from 'synaptic';
@@ -831,9 +831,9 @@ var inflectorRules = [
831
831
  }
832
832
  },
833
833
  {
834
- description: "друга відміна / чоловічий рід / м'яка група / на -(голосна)вень",
834
+ description: "друга відміна / чоловічий рід / м'яка група / стрілець",
835
835
  examples: [
836
- "півень"
836
+ "стрілець"
837
837
  ],
838
838
  partOfSpeech: "noun",
839
839
  gender: [
@@ -843,7 +843,7 @@ var inflectorRules = [
843
843
  usage: [
844
844
  ],
845
845
  pattern: {
846
- find: "(а|е|є|и|і|ї|о|у|ю|я)вень$",
846
+ find: "стрілець$",
847
847
  modify: "(.{1})(.{1})(.{1})$"
848
848
  },
849
849
  grammaticalCases: {
@@ -853,7 +853,7 @@ var inflectorRules = [
853
853
  {
854
854
  "0": {
855
855
  type: "replace",
856
- value: ""
856
+ value: "ь"
857
857
  },
858
858
  "2": {
859
859
  type: "replace",
@@ -865,7 +865,7 @@ var inflectorRules = [
865
865
  {
866
866
  "0": {
867
867
  type: "replace",
868
- value: ""
868
+ value: "ь"
869
869
  },
870
870
  "2": {
871
871
  type: "replace",
@@ -875,7 +875,7 @@ var inflectorRules = [
875
875
  {
876
876
  "0": {
877
877
  type: "replace",
878
- value: ""
878
+ value: "ь"
879
879
  },
880
880
  "2": {
881
881
  type: "replace",
@@ -887,7 +887,7 @@ var inflectorRules = [
887
887
  {
888
888
  "0": {
889
889
  type: "replace",
890
- value: ""
890
+ value: "ь"
891
891
  },
892
892
  "2": {
893
893
  type: "replace",
@@ -899,7 +899,7 @@ var inflectorRules = [
899
899
  {
900
900
  "0": {
901
901
  type: "replace",
902
- value: ""
902
+ value: "ь"
903
903
  },
904
904
  "2": {
905
905
  type: "replace",
@@ -911,21 +911,21 @@ var inflectorRules = [
911
911
  {
912
912
  "0": {
913
913
  type: "replace",
914
- value: ""
914
+ value: "ь"
915
915
  },
916
916
  "2": {
917
917
  type: "replace",
918
- value: "еві"
918
+ value: "ю"
919
919
  }
920
920
  },
921
921
  {
922
922
  "0": {
923
923
  type: "replace",
924
- value: ""
924
+ value: "ь"
925
925
  },
926
926
  "2": {
927
927
  type: "replace",
928
- value: "ю"
928
+ value: "еві"
929
929
  }
930
930
  }
931
931
  ],
@@ -933,7 +933,7 @@ var inflectorRules = [
933
933
  {
934
934
  "0": {
935
935
  type: "replace",
936
- value: ""
936
+ value: "ь"
937
937
  },
938
938
  "2": {
939
939
  type: "replace",
@@ -944,9 +944,9 @@ var inflectorRules = [
944
944
  }
945
945
  },
946
946
  {
947
- description: "друга відміна / чоловічий рід / м'яка група / на -(голосна)лець",
947
+ description: "друга відміна / чоловічий рід / м'яка група / на -(голосна)вень",
948
948
  examples: [
949
- "стрілець"
949
+ "півень"
950
950
  ],
951
951
  partOfSpeech: "noun",
952
952
  gender: [
@@ -956,7 +956,7 @@ var inflectorRules = [
956
956
  usage: [
957
957
  ],
958
958
  pattern: {
959
- find: "(а|е|є|и|і|ї|о|у|ю|я)лець$",
959
+ find: "(а|е|є|и|і|ї|о|у|ю|я)вень$",
960
960
  modify: "(.{1})(.{1})(.{1})$"
961
961
  },
962
962
  grammaticalCases: {
@@ -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",
@@ -988,7 +988,7 @@ var inflectorRules = [
988
988
  {
989
989
  "0": {
990
990
  type: "replace",
991
- value: "ь"
991
+ value: ""
992
992
  },
993
993
  "2": {
994
994
  type: "replace",
@@ -1000,7 +1000,7 @@ var inflectorRules = [
1000
1000
  {
1001
1001
  "0": {
1002
1002
  type: "replace",
1003
- value: "ь"
1003
+ value: ""
1004
1004
  },
1005
1005
  "2": {
1006
1006
  type: "replace",
@@ -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",
@@ -1024,21 +1024,21 @@ var inflectorRules = [
1024
1024
  {
1025
1025
  "0": {
1026
1026
  type: "replace",
1027
- value: "ь"
1027
+ value: ""
1028
1028
  },
1029
1029
  "2": {
1030
1030
  type: "replace",
1031
- value: "ю"
1031
+ value: "еві"
1032
1032
  }
1033
1033
  },
1034
1034
  {
1035
1035
  "0": {
1036
1036
  type: "replace",
1037
- value: "ь"
1037
+ value: ""
1038
1038
  },
1039
1039
  "2": {
1040
1040
  type: "replace",
1041
- value: "еві"
1041
+ value: "ю"
1042
1042
  }
1043
1043
  }
1044
1044
  ],
@@ -1046,7 +1046,7 @@ var inflectorRules = [
1046
1046
  {
1047
1047
  "0": {
1048
1048
  type: "replace",
1049
- value: "ь"
1049
+ value: ""
1050
1050
  },
1051
1051
  "2": {
1052
1052
  type: "replace",
@@ -2619,7 +2619,7 @@ var inflectorRules = [
2619
2619
  }
2620
2620
  },
2621
2621
  {
2622
- description: "друга відміна / чоловічий рід / м'яка група / на -.бідь",
2622
+ description: "друга відміна / чоловічий рід / м'яка група / на -бідь",
2623
2623
  examples: [
2624
2624
  "лебідь"
2625
2625
  ],
@@ -2732,7 +2732,7 @@ var inflectorRules = [
2732
2732
  }
2733
2733
  },
2734
2734
  {
2735
- description: "друга відміна / чоловічий рід / м'яка група / на -.мінь",
2735
+ description: "друга відміна / чоловічий рід / м'яка група / на -мінь",
2736
2736
  examples: [
2737
2737
  "кремінь"
2738
2738
  ],
@@ -3527,7 +3527,7 @@ var inflectorRules = [
3527
3527
  }
3528
3528
  },
3529
3529
  {
3530
- description: "друга відміна / чоловічий рід / тверда група / на -.ків",
3530
+ description: "друга відміна / чоловічий рід / тверда група / на -ків",
3531
3531
  examples: [
3532
3532
  "яків"
3533
3533
  ],
@@ -3640,7 +3640,7 @@ var inflectorRules = [
3640
3640
  }
3641
3641
  },
3642
3642
  {
3643
- description: "друга відміна / чоловічий рід / тверда група / на -.(к|р)іп",
3643
+ description: "друга відміна / чоловічий рід / тверда група / на -(к|р)іп",
3644
3644
  examples: [
3645
3645
  "прокіп"
3646
3646
  ],
@@ -5959,6 +5959,95 @@ var inflectorRules = [
5959
5959
  ]
5960
5960
  }
5961
5961
  },
5962
+ {
5963
+ description: "чоловічі по батькові та прізвища / на -іч",
5964
+ examples: [
5965
+ "ілліч"
5966
+ ],
5967
+ partOfSpeech: "noun",
5968
+ gender: [
5969
+ "male"
5970
+ ],
5971
+ priority: 2,
5972
+ usage: [
5973
+ "middleName",
5974
+ "lastName"
5975
+ ],
5976
+ pattern: {
5977
+ find: "іч$",
5978
+ modify: "(.{1})$"
5979
+ },
5980
+ grammaticalCases: {
5981
+ nominative: [
5982
+ ],
5983
+ genitive: [
5984
+ {
5985
+ "0": {
5986
+ type: "append",
5987
+ value: "а"
5988
+ }
5989
+ }
5990
+ ],
5991
+ dative: [
5992
+ {
5993
+ "0": {
5994
+ type: "append",
5995
+ value: "у"
5996
+ }
5997
+ },
5998
+ {
5999
+ "0": {
6000
+ type: "append",
6001
+ value: "еві"
6002
+ }
6003
+ }
6004
+ ],
6005
+ accusative: [
6006
+ {
6007
+ "0": {
6008
+ type: "append",
6009
+ value: "а"
6010
+ }
6011
+ }
6012
+ ],
6013
+ ablative: [
6014
+ {
6015
+ "0": {
6016
+ type: "append",
6017
+ value: "ем"
6018
+ }
6019
+ }
6020
+ ],
6021
+ locative: [
6022
+ {
6023
+ "0": {
6024
+ type: "append",
6025
+ value: "і"
6026
+ }
6027
+ },
6028
+ {
6029
+ "0": {
6030
+ type: "append",
6031
+ value: "у"
6032
+ }
6033
+ },
6034
+ {
6035
+ "0": {
6036
+ type: "append",
6037
+ value: "еві"
6038
+ }
6039
+ }
6040
+ ],
6041
+ vocative: [
6042
+ {
6043
+ "0": {
6044
+ type: "append",
6045
+ value: "у"
6046
+ }
6047
+ }
6048
+ ]
6049
+ }
6050
+ },
5962
6051
  {
5963
6052
  description: "жіночі по батькові / на -на",
5964
6053
  examples: [