shevchenko 2.0.7 → 2.1.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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @file JavaScript library for declension of Ukrainian anthroponyms
3
3
  * @module shevchenko
4
- * @version 2.0.7
4
+ * @version 2.1.0
5
5
  * @author Oleksandr Tolochko <tooleks@gmail.com>
6
6
  * @license MIT
7
7
  * @copyright 2022 Oleksandr Tolochko <tooleks@gmail.com>
@@ -17,11 +17,10 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
17
17
 
18
18
  var synaptic__default = /*#__PURE__*/_interopDefaultLegacy(synaptic);
19
19
 
20
- var Gender;
21
20
  (function (Gender) {
22
21
  Gender["Male"] = "male";
23
22
  Gender["Female"] = "female";
24
- })(Gender || (Gender = {}));
23
+ })(exports.Gender || (exports.Gender = {}));
25
24
 
26
25
  var GrammaticalCase;
27
26
  (function (GrammaticalCase) {
@@ -47,8 +46,8 @@ function validateAnthroponym(anthroponym) {
47
46
  if (typeof anthroponym !== 'object') {
48
47
  throw new TypeError('"anthroponym" must be an object.');
49
48
  }
50
- if (![Gender.Male, Gender.Female].includes(anthroponym.gender)) {
51
- throw new TypeError("\"anthroponym.gender\" must be one of the following: \"" + Gender.Male + "\", \"" + Gender.Female + "\".");
49
+ if (![exports.Gender.Male, exports.Gender.Female].includes(anthroponym.gender)) {
50
+ throw new TypeError("\"anthroponym.gender\" must be one of the following: \"" + exports.Gender.Male + "\", \"" + exports.Gender.Female + "\".");
52
51
  }
53
52
  // tslint:disable-next-line max-line-length
54
53
  if (typeof anthroponym.firstName === 'undefined' && typeof anthroponym.middleName === 'undefined' && typeof anthroponym.lastName === 'undefined') {
@@ -154436,9 +154435,9 @@ var pohorielovaStructure = {
154436
154435
  };
154437
154436
 
154438
154437
  var partOfSpeechRecognizer = new PartOfSpeechRecognizer([
154439
- new PartOfSpeechRecognitionRule(function (word, gender) { return gender === Gender.Female && /[ая]$/i.test(word); }, NeuralNetwork.fromJSON(pohorielovaStructure), pohorielovaCache),
154440
- new PartOfSpeechRecognitionRule(function (word, gender) { return gender === Gender.Male && /(ой|ий|ій)$/i.test(word); }, NeuralNetwork.fromJSON(kosmiiStructure), kosmiiCache),
154441
- new PartOfSpeechRecognitionRule(function (word, gender) { return gender === Gender.Male && /(их)$/i.test(word); }, NeuralNetwork.fromJSON(pelykhStructure), pelykhCache),
154438
+ new PartOfSpeechRecognitionRule(function (word, gender) { return gender === exports.Gender.Female && /[ая]$/i.test(word); }, NeuralNetwork.fromJSON(pohorielovaStructure), pohorielovaCache),
154439
+ new PartOfSpeechRecognitionRule(function (word, gender) { return gender === exports.Gender.Male && /(ой|ий|ій)$/i.test(word); }, NeuralNetwork.fromJSON(kosmiiStructure), kosmiiCache),
154440
+ new PartOfSpeechRecognitionRule(function (word, gender) { return gender === exports.Gender.Male && /(их)$/i.test(word); }, NeuralNetwork.fromJSON(pelykhStructure), pelykhCache),
154442
154441
  ]);
154443
154442
  var firstNameInflector = new FirstNameInflector(inflectorRules);
154444
154443
  var middleNameInflector = new MiddleNameInflector(inflectorRules);