Class TaraskConfig

Constructors

  • Parameters

    • Optionaloptions: Partial<{
          abc: {
              lower: CallableDict<RegExp>;
              upper?: CallableDict<RegExp>;
          };
          doEscapeCapitalized: boolean;
          g: boolean;
          j: OptionJ;
          leftAngleBracket: string;
          newLine: string;
          noFixPlaceholder: string;
          variations: Variation;
          wrappers: null | {
              fix?: TransformString;
              letterH?: TransformString;
              variable?: {
                  all: TransformString;
                  first: TransformString;
                  no: TransformString;
              };
          };
      }>

    Returns TaraskConfig

Properties

abc: Alphabet = ...

Predefined alphabets are in dicts.alphabets.

alphabets.cyrillic
doEscapeCapitalized: boolean = ...

If set to false, may cause unwanted changes in acronyms.

true
g: boolean = ...

Do replace ґ(g) by г(h) in cyrillic alphabet?

Value Example
true Ґвалт ґвалт
false Гвалт гвалт
true <tarH>ґ</tarH>валт <tarH>Ґ</tarH>валт
false <tarH>г</tarH>валт <tarH>Г</tarH>валт
false
j: OptionJ = ...
When to replace і(i) by й(j) after vowels Example
яна і ён
never яна і ён
random яна і ён or яна й ён
always яна й ён

Has no effect with abc set to dicts.alphabets.latinJi.

"never"
leftAngleBracket: string = ...

String to replace "<" with.

"<"
"&lt;"
newLine: string = ...

String to replace "\n" with.

"\n"
"<br>"
noFixPlaceholder: string = ...

Placeholder for parts that should not be fixed like those enclosed in < >.

Change only if the default value interferes with your text.

" \ue0fe "
variations: Variation = ...
Which variation is used if a part of word is variable Example
Гродна
no (main) Гродна
first Горадня
all (Гродна|Горадня)
"all"
wrappers: null | Partial<Wrappers> = ...

Used for wrapping changed parts. Predefined dicts are in wrappers.

If null, wrapping changes will be skipped.

null