If you're looking for JSON dictionaries, check out the github releases.
Warning
In production, replace latest with a specific version number to avoid breaking changes due to major updates.
Using latest could potentially break your website if a new version introduces breaking changes.
<head>
<script src="https://cdn.jsdelivr.net/npm/taraskevizer@latest/dist/bundle.js"></script>
<script>
// Synchronous, no initialization needed
document.write(taraskevizer.tarask("планета")); // "плянэта"
</script>
</head>With npm:
npm install taraskevizerWith yarn:
yarn add taraskevizerWith bun:
bun add taraskevizerimport {
init,
tarask,
alphabetic,
TaraskConfig,
htmlConfigOptions,
} from "taraskevizer";
await init(); // skip under Node.js: the `node` export initializes automatically
tarask("планета");
// "плянэта"
const cfg = new TaraskConfig({
abc: "cyrillic",
j: "always",
variations: "first",
wrappers: "ansi",
g: true,
});
tarask("планета і Гродна", cfg);
// "пл\x1b[32mя\x1b[0mн\x1b[32mэ\x1b[0mта \x1b[32mй\x1b[0m \x1b[35mГорадня\x1b[0m"
const htmlCfg = htmlConfigOptions(); // wrappers: "html", g: false, `<br>` newlines
htmlCfg.abc = "latin"; // g only matters for the cyrillic alphabet
tarask("энергія планеты", htmlCfg);
// "e<tarF>ne</tarF>r<tarF>g</tarF>ija p<tarF>l</tarF>a<tarF>ne</tarF>ty"
alphabetic("яна і іншыя", new TaraskConfig({ abc: "latinJi" }));
// "jana j jinšyja"
// Plain option objects work too, no `TaraskConfig` needed:
tarask("планета", { abc: "latin" });
// "planeta"| Pipeline | Taraskevization | Phonetization | Alphabet | Special syntax |
|---|---|---|---|---|
| tarask | ✅ | ❌ | ✅ | ✅ |
| alphabetic | ❌ | ❌ | ✅ | ✅ |
| phonetic | ❌ | ✅ (experimental) | ✅ | ✅ |
Difference between the input and the output word.
<tarF>this_part_of_word_is_fixed</tarF>
пл<tarF>я</tarF>нA part of a word wrapped in this tag is variable,
variations are mentioned in a data-l attribute,
separated with commas.
<tarL data-l='variation2,variation3'>variation1</tarL>
<tarL data-l='Горадня'>Гродна</tarL>May be toggled between г(h) and ґ(g).
Appears only if alphabet is cyrillic.
<tarH>г</tarH>
<tarH>Г</tarH>валт| fix | no fix | change only alphabet | |
|---|---|---|---|
| brackets | <,Планета> |
<Планета> |
<*Планета> |
| no brackets | Планета |
<.Планета> |
<*.Планета> |
The tarask command runs the prebuilt Rust binary for your platform —
the same converter as the JS API, but faster, and able to stream multi-GB
inputs with parallel processing. For the full option list, run tarask --help.
Installing the package also installs the tarask command. The binary
matching your platform is downloaded automatically
from GitHub releases on install (or, failing that, on first run):
With npm:
npm install -g taraskevizerWith yarn:
yarn global add taraskevizerWith bun:
bun add -g taraskevizercargo install tarasktarask [options] textWith npm:
npx taraskevizer [options] textWith bun:
bunx taraskevizer [options] textNote
The binary is fetched from the release matching the installed package
version. If it cannot be downloaded (offline install, --ignore-scripts),
download the asset for your platform manually (see below) and place it
into <package>/dist/bin/. Set TARASKEVIZER_SKIP_BINARY_DOWNLOAD=1
to skip the download.
Every release ships standalone tarask executables for these platforms:
| OS | Architecture | Asset |
|---|---|---|
| Linux | x64 | tarask-x86_64-unknown-linux-gnu |
| Linux | ARM64 | tarask-aarch64-unknown-linux-gnu |
| macOS | x64 (Intel) | tarask-x86_64-apple-darwin |
| macOS | ARM64 (Apple Silicon) | tarask-aarch64-apple-darwin |
| Windows | x64 | tarask-x86_64-pc-windows-msvc.exe |
Download the file from GitHub releases, make it executable (not needed on Windows) and run it:
chmod +x tarask-x86_64-unknown-linux-gnu
./tarask-x86_64-unknown-linux-gnu --latin 'планета'cargo add taraskevizeruse taraskevizer::{tarask, TaraskConfig};
let cfg = TaraskConfig::default();
assert_eq!(tarask("планета", &cfg), "плянэта");Ня should appear before a word where the first syllable is stressed.
At the moment, there is no way to check exactly if it is stressed.
Algorithm makes some heuristics, but that's not enough to cover all cases.
