shevchenko 2.0.5 → 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.
- package/README.md +7 -7
- package/dist/cjs/shevchenko.js +18698 -18701
- package/dist/cjs/shevchenko.js.map +1 -1
- package/dist/es/shevchenko.js +18676 -18680
- package/dist/es/shevchenko.js.map +1 -1
- package/dist/types/anthroponym-inflection/anthroponym-inflector.d.ts +15 -0
- package/dist/types/anthroponym-inflection/anthroponym-inflector.d.ts.map +1 -0
- package/dist/types/anthroponym-inflection/append-command-runner.d.ts +12 -0
- package/dist/types/anthroponym-inflection/append-command-runner.d.ts.map +1 -0
- package/dist/types/anthroponym-inflection/command-runner-factory.d.ts +9 -0
- package/dist/types/anthroponym-inflection/command-runner-factory.d.ts.map +1 -0
- package/dist/types/anthroponym-inflection/first-name-inflector.d.ts +12 -0
- package/dist/types/anthroponym-inflection/first-name-inflector.d.ts.map +1 -0
- package/dist/types/anthroponym-inflection/index.d.ts +6 -0
- package/dist/types/anthroponym-inflection/index.d.ts.map +1 -0
- package/dist/types/anthroponym-inflection/inflector-command-runner.d.ts +4 -0
- package/dist/types/anthroponym-inflection/inflector-command-runner.d.ts.map +1 -0
- package/dist/types/anthroponym-inflection/inflector.types.d.ts +37 -0
- package/dist/types/anthroponym-inflection/inflector.types.d.ts.map +1 -0
- package/dist/types/anthroponym-inflection/last-name-inflector.d.ts +14 -0
- package/dist/types/anthroponym-inflection/last-name-inflector.d.ts.map +1 -0
- package/dist/types/anthroponym-inflection/middle-name-inflector.d.ts +12 -0
- package/dist/types/anthroponym-inflection/middle-name-inflector.d.ts.map +1 -0
- package/dist/types/anthroponym-inflection/name-inflector.d.ts +12 -0
- package/dist/types/anthroponym-inflection/name-inflector.d.ts.map +1 -0
- package/dist/types/anthroponym-inflection/replace-command-runner.d.ts +12 -0
- package/dist/types/anthroponym-inflection/replace-command-runner.d.ts.map +1 -0
- package/dist/types/anthroponym-inflection/rule-inflector.d.ts +12 -0
- package/dist/types/anthroponym-inflection/rule-inflector.d.ts.map +1 -0
- package/dist/types/bootstrap.d.ts +1 -1
- package/dist/types/bootstrap.d.ts.map +1 -1
- package/dist/types/core/anthroponym.interface.d.ts +8 -0
- package/dist/types/core/anthroponym.interface.d.ts.map +1 -0
- package/dist/types/core/gender.enum.d.ts +5 -0
- package/dist/types/core/gender.enum.d.ts.map +1 -0
- package/dist/types/{Core/GrammaticalCase.d.ts → core/grammatical-case.enum.d.ts} +2 -3
- package/dist/types/core/grammatical-case.enum.d.ts.map +1 -0
- package/dist/types/core/index.d.ts +5 -0
- package/dist/types/core/index.d.ts.map +1 -0
- package/dist/types/{Core/Validator.d.ts → core/validator.d.ts} +2 -2
- package/dist/types/core/validator.d.ts.map +1 -0
- package/dist/types/internal.d.ts +1 -2
- package/dist/types/internal.d.ts.map +1 -1
- package/dist/types/part-of-speech-recognition/index.d.ts +6 -0
- package/dist/types/part-of-speech-recognition/index.d.ts.map +1 -0
- package/dist/types/part-of-speech-recognition/neural-network-config.d.ts +6 -0
- package/dist/types/part-of-speech-recognition/neural-network-config.d.ts.map +1 -0
- package/dist/types/part-of-speech-recognition/neural-network-training-data.d.ts +5 -0
- package/dist/types/part-of-speech-recognition/neural-network-training-data.d.ts.map +1 -0
- package/dist/types/{PartOfSpeechRecognizer/NeuralNetwork.d.ts → part-of-speech-recognition/neural-network.d.ts} +7 -7
- package/dist/types/part-of-speech-recognition/neural-network.d.ts.map +1 -0
- package/dist/types/part-of-speech-recognition/part-of-speech-decoder.d.ts +9 -0
- package/dist/types/part-of-speech-recognition/part-of-speech-decoder.d.ts.map +1 -0
- package/dist/types/{PartOfSpeechRecognizer/PartOfSpeechEncoder.d.ts → part-of-speech-recognition/part-of-speech-encoder.d.ts} +3 -3
- package/dist/types/part-of-speech-recognition/part-of-speech-encoder.d.ts.map +1 -0
- package/dist/types/part-of-speech-recognition/part-of-speech-recognition-rule.d.ts +19 -0
- package/dist/types/part-of-speech-recognition/part-of-speech-recognition-rule.d.ts.map +1 -0
- package/dist/types/part-of-speech-recognition/part-of-speech-recognizer.d.ts +14 -0
- package/dist/types/part-of-speech-recognition/part-of-speech-recognizer.d.ts.map +1 -0
- package/dist/types/part-of-speech-recognition/part-of-speech.enum.d.ts +5 -0
- package/dist/types/part-of-speech-recognition/part-of-speech.enum.d.ts.map +1 -0
- package/dist/types/{PartOfSpeechRecognizer/WordEncoder.d.ts → part-of-speech-recognition/word-encoder.d.ts} +2 -2
- package/dist/types/part-of-speech-recognition/word-encoder.d.ts.map +1 -0
- package/dist/types/part-of-speech-recognition/word-transformer.d.ts +7 -0
- package/dist/types/part-of-speech-recognition/word-transformer.d.ts.map +1 -0
- package/dist/types/shevchenko.d.ts +9 -8
- package/dist/types/shevchenko.d.ts.map +1 -1
- package/dist/types/{Utils/LangUtils.d.ts → utils/lang.utils.d.ts} +2 -2
- package/dist/types/utils/lang.utils.d.ts.map +1 -0
- package/dist/types/utils/regexp.utils.d.ts +5 -0
- package/dist/types/utils/regexp.utils.d.ts.map +1 -0
- package/dist/types/{Utils/StringUtils.d.ts → utils/string.utils.d.ts} +1 -1
- package/dist/types/utils/string.utils.d.ts.map +1 -0
- package/dist/umd/shevchenko.min.js +6 -6
- package/dist/umd/shevchenko.min.js.map +1 -1
- package/package.json +33 -25
- package/dist/types/AnthroponymInflector/AnthroponymInflector.d.ts +0 -16
- package/dist/types/AnthroponymInflector/AnthroponymInflector.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/AppendCommandRunner.d.ts +0 -12
- package/dist/types/AnthroponymInflector/AppendCommandRunner.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/CommandRunnerFactory.d.ts +0 -9
- package/dist/types/AnthroponymInflector/CommandRunnerFactory.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/FirstNameInflector.d.ts +0 -13
- package/dist/types/AnthroponymInflector/FirstNameInflector.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/GrammaticalCases.d.ts +0 -13
- package/dist/types/AnthroponymInflector/GrammaticalCases.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/InflectorCommand.d.ts +0 -7
- package/dist/types/AnthroponymInflector/InflectorCommand.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/InflectorCommandGroup.d.ts +0 -6
- package/dist/types/AnthroponymInflector/InflectorCommandGroup.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/InflectorCommandRunner.d.ts +0 -5
- package/dist/types/AnthroponymInflector/InflectorCommandRunner.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/InflectorCommandType.d.ts +0 -6
- package/dist/types/AnthroponymInflector/InflectorCommandType.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/InflectorPattern.d.ts +0 -6
- package/dist/types/AnthroponymInflector/InflectorPattern.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/InflectorRule.d.ts +0 -16
- package/dist/types/AnthroponymInflector/InflectorRule.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/LastNameInflector.d.ts +0 -15
- package/dist/types/AnthroponymInflector/LastNameInflector.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/MiddleNameInflector.d.ts +0 -13
- package/dist/types/AnthroponymInflector/MiddleNameInflector.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/NameInflector.d.ts +0 -13
- package/dist/types/AnthroponymInflector/NameInflector.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/ReplaceCommandRunner.d.ts +0 -12
- package/dist/types/AnthroponymInflector/ReplaceCommandRunner.d.ts.map +0 -1
- package/dist/types/AnthroponymInflector/RuleInflector.d.ts +0 -12
- package/dist/types/AnthroponymInflector/RuleInflector.d.ts.map +0 -1
- package/dist/types/Core/Anthroponym.d.ts +0 -9
- package/dist/types/Core/Anthroponym.d.ts.map +0 -1
- package/dist/types/Core/Gender.d.ts +0 -6
- package/dist/types/Core/Gender.d.ts.map +0 -1
- package/dist/types/Core/GrammaticalCase.d.ts.map +0 -1
- package/dist/types/Core/Validator.d.ts.map +0 -1
- package/dist/types/PartOfSpeechRecognizer/NeuralNetwork.d.ts.map +0 -1
- package/dist/types/PartOfSpeechRecognizer/NeuralNetworkParameters.d.ts +0 -7
- package/dist/types/PartOfSpeechRecognizer/NeuralNetworkParameters.d.ts.map +0 -1
- package/dist/types/PartOfSpeechRecognizer/NeuralNetworkTrainingData.d.ts +0 -6
- package/dist/types/PartOfSpeechRecognizer/NeuralNetworkTrainingData.d.ts.map +0 -1
- package/dist/types/PartOfSpeechRecognizer/PartOfSpeech.d.ts +0 -6
- package/dist/types/PartOfSpeechRecognizer/PartOfSpeech.d.ts.map +0 -1
- package/dist/types/PartOfSpeechRecognizer/PartOfSpeechDecoder.d.ts +0 -9
- package/dist/types/PartOfSpeechRecognizer/PartOfSpeechDecoder.d.ts.map +0 -1
- package/dist/types/PartOfSpeechRecognizer/PartOfSpeechEncoder.d.ts.map +0 -1
- package/dist/types/PartOfSpeechRecognizer/PartOfSpeechRecognizer.d.ts +0 -14
- package/dist/types/PartOfSpeechRecognizer/PartOfSpeechRecognizer.d.ts.map +0 -1
- package/dist/types/PartOfSpeechRecognizer/RecognizerRule.d.ts +0 -19
- package/dist/types/PartOfSpeechRecognizer/RecognizerRule.d.ts.map +0 -1
- package/dist/types/PartOfSpeechRecognizer/WordEncoder.d.ts.map +0 -1
- package/dist/types/PartOfSpeechRecognizer/WordTransformer.d.ts +0 -7
- package/dist/types/PartOfSpeechRecognizer/WordTransformer.d.ts.map +0 -1
- package/dist/types/Utils/LangUtils.d.ts.map +0 -1
- package/dist/types/Utils/RegExpUtils.d.ts +0 -5
- package/dist/types/Utils/RegExpUtils.d.ts.map +0 -1
- package/dist/types/Utils/StringUtils.d.ts.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Anthroponym, GrammaticalCase } from '../core';
|
|
2
|
+
import { FirstNameInflector } from './first-name-inflector';
|
|
3
|
+
import { LastNameInflector } from './last-name-inflector';
|
|
4
|
+
import { MiddleNameInflector } from './middle-name-inflector';
|
|
5
|
+
export declare class AnthroponymInflector {
|
|
6
|
+
private readonly firstNameInflector;
|
|
7
|
+
private readonly middleNameInflector;
|
|
8
|
+
private readonly lastNameInflector;
|
|
9
|
+
constructor(firstNameInflector: FirstNameInflector, middleNameInflector: MiddleNameInflector, lastNameInflector: LastNameInflector);
|
|
10
|
+
/**
|
|
11
|
+
* Inflects the anthroponym in the given grammatical case.
|
|
12
|
+
*/
|
|
13
|
+
inflect(anthroponym: Anthroponym, grammaticalCase: GrammaticalCase): Anthroponym;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=anthroponym-inflector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthroponym-inflector.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/anthroponym-inflector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IACxD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAsB;IAC1D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;gBAG1C,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB;IAMlI;;OAEG;IACH,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,GAAG,WAAW;CAiBjF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InflectorCommandRunner } from './inflector-command-runner';
|
|
2
|
+
import { InflectorCommand } from './inflector.types';
|
|
3
|
+
export declare class AppendCommandRunner implements InflectorCommandRunner {
|
|
4
|
+
private readonly command;
|
|
5
|
+
constructor(command: InflectorCommand);
|
|
6
|
+
/**
|
|
7
|
+
* Appends the command value to the given value.
|
|
8
|
+
* Returns a new value.
|
|
9
|
+
*/
|
|
10
|
+
exec(value: string): string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=append-command-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"append-command-runner.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/append-command-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,qBAAa,mBAAoB,YAAW,sBAAsB;IAChE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;gBAE/B,OAAO,EAAE,gBAAgB;IAIrC;;;OAGG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAG5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InflectorCommand } from './inflector.types';
|
|
2
|
+
import { InflectorCommandRunner } from './inflector-command-runner';
|
|
3
|
+
export declare class CommandRunnerFactory {
|
|
4
|
+
/**
|
|
5
|
+
* Creates a new command runner for the given command.
|
|
6
|
+
*/
|
|
7
|
+
make(command: InflectorCommand): InflectorCommandRunner;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=command-runner-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-runner-factory.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/command-runner-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAwB,MAAM,mBAAmB,CAAC;AAG3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,qBAAa,oBAAoB;IAC/B;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,gBAAgB,GAAG,sBAAsB;CAaxD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InflectorRule } from './inflector.types';
|
|
2
|
+
import { Gender, GrammaticalCase } from '../core';
|
|
3
|
+
import { NameInflector } from './name-inflector';
|
|
4
|
+
export declare class FirstNameInflector extends NameInflector {
|
|
5
|
+
private readonly rules;
|
|
6
|
+
constructor(rules: InflectorRule[]);
|
|
7
|
+
/**
|
|
8
|
+
* @inheritdoc
|
|
9
|
+
*/
|
|
10
|
+
protected inflectWord(word: string, gender: Gender, grammaticalCase: GrammaticalCase): string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=first-name-inflector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"first-name-inflector.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/first-name-inflector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;gBAE5B,KAAK,EAAE,aAAa,EAAE;IAKlC;;OAEG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,GAAG,MAAM;CAwB9F"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AnthroponymInflector } from './anthroponym-inflector';
|
|
2
|
+
export { FirstNameInflector } from './first-name-inflector';
|
|
3
|
+
export { MiddleNameInflector } from './middle-name-inflector';
|
|
4
|
+
export { LastNameInflector } from './last-name-inflector';
|
|
5
|
+
export { InflectorRule } from './inflector.types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inflector-command-runner.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/inflector-command-runner.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Gender, GrammaticalCase } from '../core';
|
|
2
|
+
import { PartOfSpeech } from '../part-of-speech-recognition';
|
|
3
|
+
export declare type InflectorRule = {
|
|
4
|
+
description: string;
|
|
5
|
+
examples: string[];
|
|
6
|
+
partOfSpeech: PartOfSpeech;
|
|
7
|
+
gender: Gender[];
|
|
8
|
+
priority: number;
|
|
9
|
+
usage: string[];
|
|
10
|
+
pattern: InflectorPattern;
|
|
11
|
+
grammaticalCases: GrammaticalCases;
|
|
12
|
+
};
|
|
13
|
+
export declare type InflectorPattern = {
|
|
14
|
+
find: string;
|
|
15
|
+
modify: string;
|
|
16
|
+
};
|
|
17
|
+
export declare type GrammaticalCases = {
|
|
18
|
+
[GrammaticalCase.Nominative]: InflectorCommandGroup[];
|
|
19
|
+
[GrammaticalCase.Genitive]: InflectorCommandGroup[];
|
|
20
|
+
[GrammaticalCase.Dative]: InflectorCommandGroup[];
|
|
21
|
+
[GrammaticalCase.Accusative]: InflectorCommandGroup[];
|
|
22
|
+
[GrammaticalCase.Ablative]: InflectorCommandGroup[];
|
|
23
|
+
[GrammaticalCase.Locative]: InflectorCommandGroup[];
|
|
24
|
+
[GrammaticalCase.Vocative]: InflectorCommandGroup[];
|
|
25
|
+
};
|
|
26
|
+
export declare type InflectorCommandGroup = {
|
|
27
|
+
[groupIndex: string]: InflectorCommand;
|
|
28
|
+
};
|
|
29
|
+
export declare type InflectorCommand = {
|
|
30
|
+
type: InflectorCommandType;
|
|
31
|
+
value: string;
|
|
32
|
+
};
|
|
33
|
+
export declare enum InflectorCommandType {
|
|
34
|
+
Replace = "replace",
|
|
35
|
+
Append = "append"
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=inflector.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inflector.types.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/inflector.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,oBAAY,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACtD,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACpD,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAClD,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACtD,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACpD,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACpD,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACrD,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACxC,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,oBAAoB;IAC9B,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InflectorRule } from './inflector.types';
|
|
2
|
+
import { Gender, GrammaticalCase } from '../core';
|
|
3
|
+
import { PartOfSpeechRecognizer } from '../part-of-speech-recognition';
|
|
4
|
+
import { NameInflector } from './name-inflector';
|
|
5
|
+
export declare class LastNameInflector extends NameInflector {
|
|
6
|
+
private readonly rules;
|
|
7
|
+
private readonly partOfSpeechRecognizer;
|
|
8
|
+
constructor(rules: InflectorRule[], partOfSpeechRecognizer: PartOfSpeechRecognizer);
|
|
9
|
+
/**
|
|
10
|
+
* @inheritdoc
|
|
11
|
+
*/
|
|
12
|
+
protected inflectWord(word: string, gender: Gender, grammaticalCase: GrammaticalCase, isLastWord: boolean): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=last-name-inflector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"last-name-inflector.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/last-name-inflector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,qBAAa,iBAAkB,SAAQ,aAAa;IAClD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAyB;gBAEpD,KAAK,EAAE,aAAa,EAAE,EAAE,sBAAsB,EAAE,sBAAsB;IAMlF;;OAEG;IAEH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM;CAgCnH"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InflectorRule } from './inflector.types';
|
|
2
|
+
import { Gender, GrammaticalCase } from '../core';
|
|
3
|
+
import { NameInflector } from './name-inflector';
|
|
4
|
+
export declare class MiddleNameInflector extends NameInflector {
|
|
5
|
+
private readonly rules;
|
|
6
|
+
constructor(rules: InflectorRule[]);
|
|
7
|
+
/**
|
|
8
|
+
* @inheritdoc
|
|
9
|
+
*/
|
|
10
|
+
protected inflectWord(word: string, gender: Gender, grammaticalCase: GrammaticalCase): string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=middle-name-inflector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middle-name-inflector.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/middle-name-inflector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAAa,mBAAoB,SAAQ,aAAa;IACpD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;gBAE5B,KAAK,EAAE,aAAa,EAAE;IAKlC;;OAEG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,GAAG,MAAM;CAY9F"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Gender, GrammaticalCase } from '../core';
|
|
2
|
+
export declare abstract class NameInflector {
|
|
3
|
+
/**
|
|
4
|
+
* Inflects the name in the given grammatical case.
|
|
5
|
+
*/
|
|
6
|
+
inflect(name: string, gender: Gender, grammaticalCase: GrammaticalCase): string;
|
|
7
|
+
/**
|
|
8
|
+
* Inflects the word of the compound name in the given grammatical case.
|
|
9
|
+
*/
|
|
10
|
+
protected abstract inflectWord(word: string, gender: Gender, grammaticalCase: GrammaticalCase, isLastWord: boolean): string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=name-inflector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"name-inflector.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/name-inflector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAElD,8BAAsB,aAAa;IACjC;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,GAAG,MAAM;IAO/E;;OAEG;IAEH,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM;CAC5H"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InflectorCommandRunner } from './inflector-command-runner';
|
|
2
|
+
import { InflectorCommand } from './inflector.types';
|
|
3
|
+
export declare class ReplaceCommandRunner implements InflectorCommandRunner {
|
|
4
|
+
private readonly command;
|
|
5
|
+
constructor(command: InflectorCommand);
|
|
6
|
+
/**
|
|
7
|
+
* Replaces the given value with the command value.
|
|
8
|
+
* Returns a new value.
|
|
9
|
+
*/
|
|
10
|
+
exec(value: string): string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=replace-command-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replace-command-runner.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/replace-command-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,qBAAa,oBAAqB,YAAW,sBAAsB;IACjE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;gBAE/B,OAAO,EAAE,gBAAgB;IAIrC;;;OAGG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAG5B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GrammaticalCase } from '../core';
|
|
2
|
+
import { InflectorRule } from './inflector.types';
|
|
3
|
+
export declare class RuleInflector {
|
|
4
|
+
private readonly rule;
|
|
5
|
+
private readonly commandRunnerFactory;
|
|
6
|
+
constructor(rule: InflectorRule);
|
|
7
|
+
/**
|
|
8
|
+
* Inflects the given word in the given grammatical case using the rule.
|
|
9
|
+
*/
|
|
10
|
+
inflect(word: string, grammaticalCase: GrammaticalCase): string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=rule-inflector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-inflector.d.ts","sourceRoot":"","sources":["../../../src/anthroponym-inflection/rule-inflector.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;IACrC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAuB;gBAEhD,IAAI,EAAE,aAAa;IAK/B;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,GAAG,MAAM;CAqBhE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AnthroponymInflector from './
|
|
1
|
+
import { AnthroponymInflector } from './anthroponym-inflection';
|
|
2
2
|
declare const anthroponymInflector: AnthroponymInflector;
|
|
3
3
|
export { anthroponymInflector };
|
|
4
4
|
//# sourceMappingURL=bootstrap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/bootstrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAKrB,MAAM,0BAA0B,CAAC;AA4ClC,QAAA,MAAM,oBAAoB,sBAAuF,CAAC;AAElH,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthroponym.interface.d.ts","sourceRoot":"","sources":["../../../src/core/anthroponym.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gender.enum.d.ts","sourceRoot":"","sources":["../../../src/core/gender.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,MAAM;IAChB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare enum GrammaticalCase {
|
|
1
|
+
export declare enum GrammaticalCase {
|
|
2
2
|
Nominative = "nominative",
|
|
3
3
|
Genitive = "genitive",
|
|
4
4
|
Dative = "dative",
|
|
@@ -7,5 +7,4 @@ declare enum GrammaticalCase {
|
|
|
7
7
|
Locative = "locative",
|
|
8
8
|
Vocative = "vocative"
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=GrammaticalCase.d.ts.map
|
|
10
|
+
//# sourceMappingURL=grammatical-case.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grammatical-case.enum.d.ts","sourceRoot":"","sources":["../../../src/core/grammatical-case.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Validates anthroponym object.
|
|
2
|
+
* Validates given anthroponym object.
|
|
3
3
|
* Throws an error if validation fails.
|
|
4
4
|
*
|
|
5
5
|
* @throws TypeError
|
|
6
6
|
*/
|
|
7
7
|
export declare function validateAnthroponym(anthroponym: any): void;
|
|
8
|
-
//# sourceMappingURL=
|
|
8
|
+
//# sourceMappingURL=validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../src/core/validator.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,GAAG,GAAG,IAAI,CA8B1D"}
|
package/dist/types/internal.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { NeuralNetwork } from './neural-network';
|
|
2
|
+
export { NeuralNetworkTrainingData } from './neural-network-training-data';
|
|
3
|
+
export { PartOfSpeech } from './part-of-speech.enum';
|
|
4
|
+
export { PartOfSpeechRecognizer } from './part-of-speech-recognizer';
|
|
5
|
+
export { PartOfSpeechRecognitionRule } from './part-of-speech-recognition-rule';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/part-of-speech-recognition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neural-network-config.d.ts","sourceRoot":"","sources":["../../../src/part-of-speech-recognition/neural-network-config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neural-network-training-data.d.ts","sourceRoot":"","sources":["../../../src/part-of-speech-recognition/neural-network-training-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,oBAAY,yBAAyB,GAAG;IACtC,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC;CAC9B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import PartOfSpeech from './
|
|
2
|
-
import NeuralNetworkTrainingData from './
|
|
3
|
-
export
|
|
1
|
+
import { PartOfSpeech } from './part-of-speech.enum';
|
|
2
|
+
import { NeuralNetworkTrainingData } from './neural-network-training-data';
|
|
3
|
+
export declare class NeuralNetwork {
|
|
4
4
|
private network;
|
|
5
5
|
constructor();
|
|
6
6
|
/**
|
|
@@ -16,13 +16,13 @@ export default class NeuralNetwork {
|
|
|
16
16
|
*/
|
|
17
17
|
toString(): string;
|
|
18
18
|
/**
|
|
19
|
-
* Trains the neural network using
|
|
19
|
+
* Trains the neural network using the given training data.
|
|
20
20
|
*/
|
|
21
21
|
train(trainingData: NeuralNetworkTrainingData, trainingOptions: any): NeuralNetwork;
|
|
22
22
|
/**
|
|
23
|
-
* Activates the neural network for
|
|
24
|
-
* Returns a part of speech of
|
|
23
|
+
* Activates the neural network for the given word.
|
|
24
|
+
* Returns a part of speech of the given word.
|
|
25
25
|
*/
|
|
26
26
|
activate(word: string): PartOfSpeech;
|
|
27
27
|
}
|
|
28
|
-
//# sourceMappingURL=
|
|
28
|
+
//# sourceMappingURL=neural-network.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neural-network.d.ts","sourceRoot":"","sources":["../../../src/part-of-speech-recognition/neural-network.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAKrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAmB;;IAUlC;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,GAAG,GAAG,aAAa;IAM9C;;OAEG;IACH,MAAM;IAIN;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,KAAK,CAAC,YAAY,EAAE,yBAAyB,EAAE,eAAe,EAAE,GAAG,GAAG,aAAa;IAWnF;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY;CAKrC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PartOfSpeech } from './part-of-speech.enum';
|
|
2
|
+
export declare class PartOfSpeechDecoder {
|
|
3
|
+
/**
|
|
4
|
+
* Decodes an output of a neural network.
|
|
5
|
+
* Returns a part of speech.
|
|
6
|
+
*/
|
|
7
|
+
decode(input: number[]): PartOfSpeech;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=part-of-speech-decoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part-of-speech-decoder.d.ts","sourceRoot":"","sources":["../../../src/part-of-speech-recognition/part-of-speech-decoder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrD,qBAAa,mBAAmB;IAC9B;;;OAGG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,YAAY;CAiBtC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PartOfSpeech from './
|
|
1
|
+
import { PartOfSpeech } from './part-of-speech.enum';
|
|
2
2
|
export declare const DIGIT_NOUN = 0;
|
|
3
3
|
export declare const DIGIT_ADJECTIVE = 1;
|
|
4
|
-
export
|
|
4
|
+
export declare class PartOfSpeechEncoder {
|
|
5
5
|
/**
|
|
6
6
|
* Encodes a part of speech for use in the neural network.
|
|
7
7
|
*/
|
|
8
8
|
encode(input: PartOfSpeech): number[];
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=
|
|
10
|
+
//# sourceMappingURL=part-of-speech-encoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part-of-speech-encoder.d.ts","sourceRoot":"","sources":["../../../src/part-of-speech-recognition/part-of-speech-encoder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,qBAAa,mBAAmB;IAC9B;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,EAAE;CAUtC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PartOfSpeech } from './part-of-speech.enum';
|
|
2
|
+
import { Gender } from '../core';
|
|
3
|
+
import { NeuralNetwork } from './neural-network';
|
|
4
|
+
import { NeuralNetworkTrainingData } from './neural-network-training-data';
|
|
5
|
+
export interface PartOfSpeechRecognitionGuard {
|
|
6
|
+
(word: string, gender: Gender): boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class PartOfSpeechRecognitionRule {
|
|
9
|
+
readonly guard: PartOfSpeechRecognitionGuard;
|
|
10
|
+
readonly cache: NeuralNetworkTrainingData;
|
|
11
|
+
private readonly neuralNetwork;
|
|
12
|
+
constructor(guard: PartOfSpeechRecognitionGuard, neuralNetwork: NeuralNetwork, cache: NeuralNetworkTrainingData);
|
|
13
|
+
/**
|
|
14
|
+
* Applies the part of speech recognizer rule to the given word.
|
|
15
|
+
* Returns a part of speech of the given word.
|
|
16
|
+
*/
|
|
17
|
+
apply(word: string): PartOfSpeech;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=part-of-speech-recognition-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part-of-speech-recognition-rule.d.ts","sourceRoot":"","sources":["../../../src/part-of-speech-recognition/part-of-speech-recognition-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAG3E,MAAM,WAAW,4BAA4B;IAC3C,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;CACzC;AAED,qBAAa,2BAA2B;IACtC,QAAQ,CAAC,KAAK,EAAE,4BAA4B,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,yBAAyB,CAAC;IAC1C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;gBAElC,KAAK,EAAE,4BAA4B,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,yBAAyB;IAM/G;;;OAGG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY;CAOlC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PartOfSpeechRecognitionRule } from './part-of-speech-recognition-rule';
|
|
2
|
+
import { Gender } from '../core';
|
|
3
|
+
import { PartOfSpeech } from './part-of-speech.enum';
|
|
4
|
+
export declare class PartOfSpeechRecognizer {
|
|
5
|
+
private readonly rules;
|
|
6
|
+
constructor(rules: PartOfSpeechRecognitionRule[]);
|
|
7
|
+
/**
|
|
8
|
+
* Recognizes the part of speech of the given word.
|
|
9
|
+
* Returns part of speech of the given word.
|
|
10
|
+
* Returns null if part of speech was not recognized.
|
|
11
|
+
*/
|
|
12
|
+
recognize(word: string, gender: Gender): PartOfSpeech | null;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=part-of-speech-recognizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part-of-speech-recognizer.d.ts","sourceRoot":"","sources":["../../../src/part-of-speech-recognition/part-of-speech-recognizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrD,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgC;gBAE1C,KAAK,EAAE,2BAA2B,EAAE;IAIhD;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;CAQ7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part-of-speech.enum.d.ts","sourceRoot":"","sources":["../../../src/part-of-speech-recognition/part-of-speech.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,SAAS,cAAc;CACxB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare class WordEncoder {
|
|
2
2
|
private readonly size;
|
|
3
3
|
constructor(size?: number);
|
|
4
4
|
/**
|
|
@@ -6,4 +6,4 @@ export default class WordEncoder {
|
|
|
6
6
|
*/
|
|
7
7
|
encode(input: string): number[];
|
|
8
8
|
}
|
|
9
|
-
//# sourceMappingURL=
|
|
9
|
+
//# sourceMappingURL=word-encoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"word-encoder.d.ts","sourceRoot":"","sources":["../../../src/part-of-speech-recognition/word-encoder.ts"],"names":[],"mappings":"AAEA,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;gBAElB,IAAI,GAAE,MAA2C;IAI7D;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;CAUhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"word-transformer.d.ts","sourceRoot":"","sources":["../../../src/part-of-speech-recognition/word-transformer.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAe;IAC1B;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAGhC"}
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import Anthroponym from './
|
|
1
|
+
import { Anthroponym, Gender } from './core';
|
|
2
2
|
/**
|
|
3
|
-
* Inflects
|
|
3
|
+
* Inflects the anthroponym in nominative grammatical case.
|
|
4
4
|
*/
|
|
5
5
|
export declare function inNominative(anthroponym: Anthroponym): Anthroponym;
|
|
6
6
|
/**
|
|
7
|
-
* Inflects
|
|
7
|
+
* Inflects the anthroponym in genitive grammatical case.
|
|
8
8
|
*/
|
|
9
9
|
export declare function inGenitive(anthroponym: Anthroponym): Anthroponym;
|
|
10
10
|
/**
|
|
11
|
-
* Inflects
|
|
11
|
+
* Inflects the anthroponym in dative grammatical case.
|
|
12
12
|
*/
|
|
13
13
|
export declare function inDative(anthroponym: Anthroponym): Anthroponym;
|
|
14
14
|
/**
|
|
15
|
-
* Inflects
|
|
15
|
+
* Inflects the anthroponym in accusative grammatical case.
|
|
16
16
|
*/
|
|
17
17
|
export declare function inAccusative(anthroponym: Anthroponym): Anthroponym;
|
|
18
18
|
/**
|
|
19
|
-
* Inflects
|
|
19
|
+
* Inflects the anthroponym in ablative grammatical case.
|
|
20
20
|
*/
|
|
21
21
|
export declare function inAblative(anthroponym: Anthroponym): Anthroponym;
|
|
22
22
|
/**
|
|
23
|
-
* Inflects
|
|
23
|
+
* Inflects the anthroponym in locative grammatical case.
|
|
24
24
|
*/
|
|
25
25
|
export declare function inLocative(anthroponym: Anthroponym): Anthroponym;
|
|
26
26
|
/**
|
|
27
|
-
* Inflects
|
|
27
|
+
* Inflects the anthroponym in vocative grammatical case.
|
|
28
28
|
*/
|
|
29
29
|
export declare function inVocative(anthroponym: Anthroponym): Anthroponym;
|
|
30
|
+
export { Anthroponym, Gender };
|
|
30
31
|
export * as Internal from './internal';
|
|
31
32
|
//# sourceMappingURL=shevchenko.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shevchenko.d.ts","sourceRoot":"","sources":["../../src/shevchenko.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,
|
|
1
|
+
{"version":3,"file":"shevchenko.d.ts","sourceRoot":"","sources":["../../src/shevchenko.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAwC,MAAM,QAAQ,CAAC;AAGnF;;GAEG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAGlE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAGhE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAG9D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAGlE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAGhE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAGhE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAGhE;AAED,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;AAG/B,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const PATTERN_VOWELS: RegExp;
|
|
2
2
|
/**
|
|
3
|
-
* Counts vowel sounds in
|
|
3
|
+
* Counts vowel sounds in the given word.
|
|
4
4
|
* Returns a number of vowels.
|
|
5
5
|
*/
|
|
6
6
|
export declare function countVowels(word: string): number;
|
|
7
|
-
//# sourceMappingURL=
|
|
7
|
+
//# sourceMappingURL=lang.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lang.utils.d.ts","sourceRoot":"","sources":["../../../src/utils/lang.utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAAmB,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regexp.utils.d.ts","sourceRoot":"","sources":["../../../src/utils/regexp.utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAOxD"}
|
|
@@ -11,4 +11,4 @@ export declare function isUpperCase(src: string, pos?: number): boolean;
|
|
|
11
11
|
* Detects if a character is in the lower case at the specified index.
|
|
12
12
|
*/
|
|
13
13
|
export declare function isLowerCase(src: string, pos?: number): boolean;
|
|
14
|
-
//# sourceMappingURL=
|
|
14
|
+
//# sourceMappingURL=string.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.utils.d.ts","sourceRoot":"","sources":["../../../src/utils/string.utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CA8BhE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU,GAAG,OAAO,CAEjE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU,GAAG,OAAO,CAEjE"}
|