taraskevizer 9.1.6 → 9.1.7
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/dist/bin.js +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/constants.d.ts +1 -1
- package/dist/dict/iawords.js +1 -1
- package/dist/lib/after-tarask.js +6 -2
- package/dist/lib/mutating-step.d.ts +1 -1
- package/dist/steps/join-splitted.d.ts +1 -1
- package/dist/steps/types.d.ts +1 -1
- package/dist/wrappers.d.ts +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -7,7 +7,7 @@ const printWithPrefix = (msg) => {
|
|
|
7
7
|
process.argv.splice(0, 2);
|
|
8
8
|
const checkForOptions = (options) => process.argv[0] && options.includes(process.argv[0].toLowerCase());
|
|
9
9
|
if (checkForOptions(['-v', '--version'])) {
|
|
10
|
-
printWithPrefix("9.1.
|
|
10
|
+
printWithPrefix("9.1.7");
|
|
11
11
|
process.exit(0);
|
|
12
12
|
}
|
|
13
13
|
if (checkForOptions(['-h', '--help'])) {
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PartialReadonly } from './types';
|
|
2
|
-
import { Alphabet } from './dict/alphabets';
|
|
3
|
-
import { WrapperDict } from './wrappers';
|
|
2
|
+
import type { Alphabet } from './dict/alphabets';
|
|
3
|
+
import { type WrapperDict } from './wrappers';
|
|
4
4
|
export type Variation = 'no' | 'first' | 'all';
|
|
5
5
|
export type OptionJ = 'never' | 'random' | 'always';
|
|
6
6
|
export declare class TaraskConfig {
|
package/dist/constants.d.ts
CHANGED
package/dist/dict/iawords.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { iwords } from './iwords.js';
|
|
2
2
|
import { dictFrom, toOneLine } from './lib.js';
|
|
3
|
-
const ia = (word, words) => ` ${word}(?= \\(?(?:[
|
|
3
|
+
const ia = (word, words) => ` ${word}(?= \\(?(?:[бвгджзйклмнпрстфцчшўьʼ]*[оё]|${toOneLine(words).replace(/\(/g, '(?:')}|i(?:${iwords})))`;
|
|
4
4
|
export const iaWords = dictFrom.raw([
|
|
5
5
|
|
|
6
6
|
[
|
package/dist/lib/after-tarask.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
const prepositionPattern = /^(?:а[бд]?|б[ея]зь?|[дз]а|д?ля|дзеля|[нп]ад?|пр[аы]|празь?|у|церазь?)$/;
|
|
2
2
|
const isSingleVowel = (str) => str.match(/[аеёіоуыэюя]/g)?.length === 1;
|
|
3
|
+
const isFirstSyllabeStressed = (word) => /^[бвгджзйклмнпрстфцчшўьʼ]*.\u0301/.test(word);
|
|
3
4
|
export const endZSoftenAndNiaBiaz = [
|
|
4
5
|
[
|
|
5
6
|
/ бе(зь? \S+)/g,
|
|
6
|
-
($0, $1) => (isSingleVowel($1) ? ' бя' + $1 : $0
|
|
7
|
+
($0, $1) => isFirstSyllabeStressed($1) || isSingleVowel($1) ? ' бя' + $1 : $0,
|
|
7
8
|
],
|
|
8
9
|
[
|
|
9
10
|
/ не (\S+)/g,
|
|
10
|
-
($0, $1) =>
|
|
11
|
+
($0, $1) => isFirstSyllabeStressed($1) ||
|
|
12
|
+
(isSingleVowel($1) && !prepositionPattern.test($1))
|
|
13
|
+
? ' ня ' + $1
|
|
14
|
+
: $0,
|
|
11
15
|
],
|
|
12
16
|
[/ б[ея]з(?= і\S*[ая]ў|ну )/g, ' бязь'],
|
|
13
17
|
[/( (?:пра|цера)?з)(?= і\S*[ая]ў|ну )/g, (_$0, $1) => $1 + 'ь'],
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SplittedTextStorage } from './types';
|
|
1
|
+
import type { SplittedTextStorage } from './types';
|
|
2
2
|
export declare const joinSplittedText: import("./types").TaraskStep<SplittedTextStorage>;
|
package/dist/steps/types.d.ts
CHANGED
package/dist/wrappers.d.ts
CHANGED