Anbani is a multifunctional toolkit designed for Georgian Alphabet. Main functionalities include text conversion between various Georgian alphabets via anbani.core and random text generation via anbani.lorem.
To install the package simple grab it from npm
npm install anbaniInitialize package in CommonJS format as follows
const anbani = require('anbani')Load the module in ESM definition like this
import anbani from "anbani";You may use it in browser via window global
<script src="https://cdn.jsdelivr.net/npm/anbani@latest/dist/anbani.js"></script>To try modern module definition in browsers you may include directly from source. (Notice src directory in URL)
<script type="module">
import anbani from "https://cdn.jsdelivr.net/npm/anbani@latest/src/anbani.mjs";
...
</script>Here's the structure of the package with four main modules: core for conversion and interpretation of letters, lorem for random text generation, data for accessing the datasets, and toolkit for bonus features.
Minor features from each module are exposed in $, such as anbani.lorem.$.*.
anbani
โโ core
โ โโ convert [Function]
โ โโ interpret [Function]
โ โโ classify [Function] // names the source script, or "unknown"
โ โโ $ // alias of classify; $.classifyText also works
โโ lorem
โ โโ sentences [Function]
โ โโ paragraphs [Function]
โ โโ loadWordlist [Function]
โ โโ names [Function]
โ โโ $
โ โโ randomFirstName [Function]
โ โโ randomLastName [Function]
โ โโ randomWord [Function]
โโ toolkit
โ โโ friedman [Function]
โ โโ frequency [Function]
โ โโ count [Function]
โโ nlp
โ โโ contractions { expand, expandText, contract, contractText }
โ โโ georgianisation { georgianise, latinise }
โ โโ preprocessing { wordTokenize, sentenceTokenize, paragraphTokenize, cleanup }
โโ ab
โ โโ letters { mkhedruli, asomtavruli, nuskhuri, mtavruli } [String]
โ โโ keys [Array]
โ โโ caps / bicam / bicaps [Function]
โโ data
โโ alphabets // per-script letter tables + names + numeric
โโ regex // per-script detection patternsanbani.core.convert supports all of the Georgian unicameral and bicameral alphabets for conversion listed bellow and even more. Note that you may use Georgian and Latin letters to pass parameters. It's just a less headache.
// convert(TEXT, FROM, TO)
anbani.core.convert("แแแแแแ", "แแฎแแแ แฃแแ", "แแกแแแแแแ แฃแแ")
// 'แ แฌแกแ แฌแจ'
anbani.core.convert("แแแแแแ", "mkhedruli", "แแฃแกแฎแฃแ แ")
// 'โดโดโดโดโดโด'Georgian also has bicameral styles of the alphabet. If you first hear about that now, check out this article.
Generally, automatic capitalization occurs at the beginning of the sentence. However, you can also append the letter with ' symbol in order to capitalize the word during conversion. This trick also works at anbani.ge as well. Here's an example
anbani.core.convert("แ'แแแแแ", "แแฎแแแ แฃแแ", "แจแแแแซแแกแแฃแแ")
// 'แ แแแแแ'
anbani.core.convert("แ'แงแ แ'แ แแแแแก แ 'แแกแขแแแแ", "mkhedruli", "shanidziseuli")
// 'แจแงแ แ แ แแแแแก แฐแแกแขแแแแ'Here are all of the conversions supported. Note that you may convert to any of these types but not all of them are supported to be converted from. In other words, you can only convert from Mkhedruli, Asomtavruli, Nuskhuri, Mtavruli, and Qwerty, since there is no 1-to-1 relation amongst others.
| word | sentence | |
|---|---|---|
| names | แฅแแแแแ แแแแแแฃแแแแกแแ | แแแแแแแแแแแแแ แแแฆแแแแแแแแจแแแแแแแ แแแแแแแแแแกแแ แฅแแแแแ แแแแแแแแแแแแแกแแแแแ แฌแแแแแแแแแแ แแแแแแแแ แแแแ |
| mkhedruli | แฅแแ แแฃแแ | แแแแแ แแฆแแแจแแแแแแแ แฅแแ แแแแแแ แฌแแแแแแแแ |
| mtavruli | แฒฅแฒแฒ แฒแฒฃแฒแฒ | แฒแฒแฒแฒแฒ แฒแฒฆแฒแฒแฒจแฒแฒแฒแฒแฒแฒแฒ แฒฅแฒแฒ แฒแฒแฒแฒแฒแฒ แฒฌแฒแฒแฒแฒแฒแฒแฒแฒ |
| asomtavruli | แตแ แฐแงแณแชแจ | แฃแ แฅแจแง แ แถแซแ แธแคแฌแคแกแคแชแจ แตแ แฐแงแฅแคแชแงแ แผแซแจแฌแฃแ แฌแจแ |
| khutsuri | แตโดโดโดโดโดโด | แฃโดโด โดโด โดโดโดโดโดโดโดโดโดโดโดโด โดโดโดโดโด โดโดโดโด โดโดโดโดโดโดโดโดโด |
| shanidziseuli | แตแแ แแฃแแ | แฃแแแแ แแฆแแแจแแแแแแแ แฅแแ แแแแแแ แฌแแแแแแแแ |
| tfileliseuli | แฒฅแแ แแฃแแ | แฒแแแแ แแฆแแแจแแแแแแแ แฅแแ แแแแแแ แฌแแแแแแแแ |
| sasataure | แตแฒแฒ แฒแฒฃแฒแฒ | แฃแฒแฒแฒแฒ แฒแฒฆแฒแฒแฒจแฒแฒแฒแฒแฒแฒแฒ แฒฅแฒแฒ แฒแฒแฒแฒแฒแฒ แฒฌแฒแฒแฒแฒแฒแฒแฒแฒ |
| nuskhuri | โดโดโดโดโดโดโด | โดโดโด โดโด โดโดโดโดโดโดโดโดโดโดโดโด โดโดโดโดโด โดโดโดโด โดโดโดโดโดโดโดโดโด |
| homoglyph | โดโดขแฆแฆแงโดโแฆต | แฆโดขแงโแฆตแฆ โดขโดโดโดข๐คแ เฆแ ีฑแ โดโแฆต โดโดขแฆแฆแงแ โดแฆโดข แฌโดโแฆตเฆแฆโดขเฆโแฆตโดข |
| phonetic | kสฐษrtสฐuli | dษvitสฐ ษสmษสษnษbษli kสฐษrtสฐvษltสฐษ tอกsสผmindษniษ |
| braille | โ ปโ โ โ โ ฅโ โ | โ โ โ บโ โ โ โ ซโ โ โ ฑโ โ โ โ โ โ โ โ ปโ โ โ โ บโ โ โ โ โ นโ โ โ โ โ โ โ โ |
| common | qartuli | davit aghmashenebeli qartvelta tsmindania |
| cyrillic | ะบะฐัััะปะธ | ะดะฐะฒะธั ะฐะณะผะฐัะตะฝะตะฑะตะปะธ ะบะฐััะฒะตะปัะฐ ััะผะธะฝะดะฐะฝะธะฐ |
| greek | ฮบฮฑฯฯฮฟฯ ฮปฮท | ฮฝฯฮฑฮฒฮทฯ ฮฑฮณฮผฮฑฯอฑฮตฮฝฮตฮผฯฮตฮปฮท ฮบฮฑฯฯฮฒฮตฮปฯฮฑ ฯฯฮผฮทฮฝฮฝฯฮฑฮฝฮทฮฑ |
| armenian | ึีกีผีฉีธึีฌีซ | ีคีกีพีซีฉ ีกีฒีดีกีทีงีถีงีขีงีฌีซ ึีกีผีฉีพีงีฌีฉีก ีฎีดีซีถีคีกีถีซีก |
| iso_9984 | k'art'uli | davit' aแธกmaลกenebeli k'art'velt'a cmindania |
| national | kartuli | davit aghmashenebeli kartvelta ts'mindania |
| bgn | k'art'uli | davit' aghmashenebeli k'art'velt'a tsmindania |
| titus | kartuli | davit aฤกmaลกenebeli kartvelta cฬฃmindania |
| qwerty | qarTuli | daviT aRmaSenebeli qarTvelTa wmindania |
| numeric | 600110094003010 | 416109 17004019005505253010 60011009653091 40004010504150101 |
If you are wondering what Georgian alphabets look like, or what's the difference between all these latinizations here's the table for that as well. Note: if you are not seeing Mtavruli, that's because it was recently added to Unicode and rollout will probably take a while. You can grab DejaVu fonts that support Mtavruli already.
| names | แแ | แแแ | แแแ | แแแ | แแ | แแแ | แแแ | แแแ | แแ | แแแ | แแแก | แแแ | แแแ | แแ | แแแ | แแแ | แ แแ | แกแแ | แขแแ | แฃแ | แคแแ | แฅแแ | แฆแแ | แงแแ | แจแแ | แฉแแ | แชแแ | แซแแ | แฌแแ | แญแแ | แฎแแ | แฏแแ | แฐแแ | แแฒ | แฒแ | แณแ | แดแแ | แฐแแ | แถแ | แทแ | แธแแ | แแแ แแแแขแ แแแแแแฃแแ | แแแ แแแแขแ แแแแแแฃแแ | แแแแงแแคแ | แแแ แแแแแคแแแแขแแ แ | แแแ | แกแแแแแ แแก แแแจแแแ | แแแแแแแแแแชแแแก แแแจแแแ | แ-แฃแแแแฃแขแ | แ-แแแแ แแแ | แ-แแแแ แแ-แฃแแแแฃแขแ | แ-แแแแ แแแ | แ-แแแแ แแแ | แ-แฃแแแแฃแขแ | แ-แแแแ แแแ | แ-แแแแ แแ-แฃแแแแฃแขแ | แฃ-แฃแแแแฃแขแ | แฃ-แแแแ แแแ | แฃ-แแแแ แแ-แฃแแแแฃแขแ | แฃ-แแ แฏแแฃ | แทแ-แแแแ แแแ | แฌแแ แขแแแ | แแซแแแ | แแแแฎแแแก แแแจแแแ | แซแแฎแแแแก แแแจแแแ | แฌแแ แขแแ-แแซแแแ | แแ แฌแแ แขแแแ |
| mkhedruli | แ | แ | แ | แ | แ | แ | แ | แ | แ | แ | แ | แ | แ | แ | แ | แ | แ | แก | แข | แฃ | แค | แฅ | แฆ | แง | แจ | แฉ | แช | แซ | แฌ | แญ | แฎ | แฏ | แฐ | แฑ | แฒ | แณ | แด | แต | แถ | แท | แธ | แน | แบ | แป | แผ | แฝ | แพ | แฟ | แฬ | แฬ | แฬฬ | แฬ | แฬ | แฬ | แฬ | แฬฬ | แฃฬ | แฃฬ | แฃฬฬ | แฃฬ | แทฬ | . | , | ? | ! | ; | : |
| mtavruli | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒ | แฒก | แฒข | แฒฃ | แฒค | แฒฅ | แฒฆ | แฒง | แฒจ | แฒฉ | แฒช | แฒซ | แฒฌ | แฒญ | แฒฎ | แฒฏ | แฒฐ | แฒฑ | แฒฒ | แฒณ | แฒด | แฒต | แฒถ | แฒท | แฒธ | แฒน | แฒบ | แฒฝ | แฒพ | แฒฟ | . | , | ? | ! | ; | : | |||||||||||||||
| asomtavruli | แ | แก | แข | แฃ | แค | แฅ | แฆ | แง | แจ | แฉ | แช | แซ | แฌ | แญ | แฎ | แฏ | แฐ | แฑ | แฒ | แณ | แด | แต | แถ | แท | แธ | แน | แบ | แป | แผ | แฝ | แพ | แฟ | แ | แ | แ | แ | แ | แ | . | , | ? | ! | ; | : | |||||||||||||||||||||||
| nuskhuri | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โด | โดก | โดข | โดฃ | โดค | โดฅ | . | , | ? | ! | ; | : | |||||||||||||||||||||||
| homoglyph | โดข | ีฑ | เฌ | แฆ | แ | แง | เญซ | แฆ | โแฆต | เซฉ | โด | โด | เฆ | แฆ | แฒด | เชณ | แฆ | แ | เฎเฏ | แง | แฆ | โด | โด | แง | ๐ค | โด | เช | แป | แฌ | แญ | แน | โด | แฒฑ | . | , | ? | ! | ; | : | ||||||||||||||||||||||||||||
| phonetic | ษ | b | g | d | ษ | v | z | tสฐ | i | k' | l | m | n | ษ | p' | ส | r | s | t' | u | pสฐ | kสฐ | ส | q' | ส | tอกส | tอกs | dอกz | tอกsสผ | tอกสสผ | ฯ | dอกส | h | eษช | j | w | qสฐ | oห | f | ษ | ส | ษข | ส | โฬ | ษ | . | , | ? | ! | ; | : | ||||||||||||||||
| braille | โ | โ | โ | โ | โ | โ บ | โ ต | โ | โ | โ | โ | โ | โ | โ | โ | โ | โ | โ | โ | โ ฅ | โ ง | โ ป | โ ซ | โ ฎ | โ ฑ | โ | โ | โ ฝ | โ น | โ ญ | โ | โ ช | โ ฏ | โ | โ ฒ | โ | โ ฆ | โ | โ | โ | |||||||||||||||||||||||||||
| common | a | b | g | d | e | v | z | t | i | k | l | m | n | o | p | zh | r | s | t | u | f | q | gh | y | sh | ch | c | dz | ts | tch | x | j | h | e | i | ui | x | hoi | f | oa | h | gh | rgh | oa | . | , | ? | ! | ; | : | |||||||||||||||||
| cyrillic | ะฐ | ะฑ | ะณ | ะด | ะต | ะฒ | ะท | ั | ะธ | ะบ | ะป | ะผ | ะฝ | ะพ | ะฟ | ะถ | ั | ั | ั | ั | ั | ะบ | ะณ | ะบ | ั | ั | ั | ะดะท | ัั | ัั | ั | ะดะถ | ั | ะต | ะน | ัะน | ั | ั ะพ | ั | ะพะฐ | ั | ะณ | ัะณ | ะพะฐ | . | , | ? | ! | ; | : | |||||||||||||||||
| greek | ฮฑ | ฮผฯ | ฮณฮณ | ฮฝฯ | ฮต | ฮฒ | ฮถ | ฯ | ฮท | ฮบ | ฮป | ฮผ | ฮฝ | ฮฟ | ฯ | ฮถอฑ | ฯ | ฯ | ฯ | ฮฟฯ | ฯ | ฮบ | ฮณ | ฮบอฑ | ฯอฑ | ฯฯ | ฯฯ | ฮดฮถ | ฯฯ | ฯฯอฑ | ฮณฯ | ฯฮถ | อฑ | ฮต | ฮน | ฯ ฮน | ฮบฯ | อฑฮฟฮน | ฯ | ฮฟฮฑ | อฑ | ฮณ | ฯฮณ | ฮฟฮฑ | . | , | ? | ! | ; | : | |||||||||||||||||
| armenian | ีก | ีข | ีฃ | ีค | ีง | ีพ | ีฆ | ีฉ | ีซ | ีฏ | ีฌ | ีด | ีถ | ึ | ีบ | ีช | ีผ | ีฝ | ีฟ | ีธึ | ึ | ึ | ีฒ | ีฏีฐ | ีท | ีน | ึ | ีฑ | ีฎ | ีณ | ีญ | ีป | ีฐ | ีง | ีซ | ีธึีซ | ีญ | ีฐึ ีซ | ึ | ีจ | ีฐ | ีฒ | ีผีฒ | ีจ | . | , | ? | ! | ; | : | |||||||||||||||||
| iso_9984 | a | b | g | d | e | v | z | t' | i | k | l | m | n | o | p | ลพ | r | s | t | u | p' | k' | แธก | q | ลก | ฤ' | c' | j | c | ฤ | x | วฐ | h | ฤ | y | w | แบ' | ล | f | . | , | ? | ! | ; | : | ||||||||||||||||||||||
| national | a | b | g | d | e | v | z | t | i | k' | l | m | n | o | p' | zh | r | s | t' | u | p | k | gh | q' | sh | ch | ts | dz | ts' | ch' | kh | j | h | . | , | ? | ! | ; | : | ||||||||||||||||||||||||||||
| bgn | a | b | g | d | e | v | z | t' | i | k | l | m | n | o | p | zh | r | s | t | u | p' | k' | gh | q | sh | ch' | ts' | dz | ts | ch | kh | j | h | ey | j | q' | . | , | ? | ! | ; | : | |||||||||||||||||||||||||
| titus | a | b | g | d | e | v | z | t | i | แธณ | l | m | n | o | แน | ลพ | r | s | แนญ | u | p | k | ฤก | qฬ | ลก | ฤ | c | ำก | cฬฃ | ฤฬฃ | x | วฏ | h | ฤ | y | w | q | ล | . | , | ? | ! | ; | : | |||||||||||||||||||||||
| qwerty | a | b | g | d | e | v | z | T | i | k | l | m | n | o | p | J | r | s | t | u | f | q | R | y | S | C | c | Z | w | W | x | j | h | E | I | V | X | H | F | D | Y | G | L | > | N | < | { | } | . | , | ? | ! | ; | : | |||||||||||||
| numeric | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 20 | 30 | 40 | 50 | 70 | 80 | 90 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 | 2000 | 3000 | 4000 | 5000 | 6000 | 8000 | 9000 | 8 | 60 | 400 | 7000 | 10000 | . | , | ? | ! | ; | : |
Apart from straightforward conversion, the package also supports interpretation capabilities via anbani.core.interpret, which automagically detects the language of the text and converts to desired to parameter script.
// function interpret(TEXT, TO)
anbani.core.interpret("iyo arabeTs rostevan mefe RmrTisagan sviani", "mkhedruli")
// 'แแงแ แแ แแแแแก แ แแกแขแแแแ แแแคแ แฆแแ แแแกแแแแ แกแแแแแ'anbani.lorem supports random text and names generation in Georgian via anbani.lorem.sentences, anbani.lorem.paragraphs, and anbani.lorem.names. Unlike other packages, anbani.lorem utilizes wordlists generated using Neural Networks CHAR-RNN by Andrej Karpathy that represents truly fake Georgian words with all the statistics preserved. The network was trained on Georgian epic "The Knight with the Panther Skin" (แแแคแฎแแกแขแงแแแกแแแ) and the names of Georgian poets and writers. Corresponding repo will be forthcoming.
Here's an example for name generation:
anbani.lorem.names(3)
// ['แแแแแ แแแจแแแแแแ', 'แกแแแ แงแแ แแแแแ', 'แแแแแ แแแฌแแจแแแแ']Here's an example for sentence generation:
// function sentences(WORD_COUNT)
anbani.lorem.sentences(10)
// 'แแแแฎแแแแแก แกแแขแแ แแ แแแจแแฎแแ แแ. แฌแแแแ แแแแแแ แแแ, แฐแฅแแแแแแแกแแแ แแแแ แฃแคแแ, แฃแแ แแแแแแแแแ แแแกแแแแชแ แแงแแแแ.'Here's an example for paragraph generation:
// function paragraphs(
// WORD_COUNT_PER_PARAGRAPH,
// PARAGRAPH_COUNT,
// NEWLINE_CHAR="\n\n"
// )
anbani.lorem.paragraphs(20,3)แแแแแแแแแแแ แแแแฎแแแแแก แจแแแแแกแญแแ แแขแแ แฐแฅแแแแแแแกแแแ, แแแแแฏแแ แแแ แแแแ แแชแ. แขแแขแ แแกแขแแแ. แจแแแแแกแญแแ แแขแแ แแแฃแแแแ แแแแแแแแ แแแแแจแแจแแก แแฃแแแแแแก แจแแแแฎแแแ, แแแแแแชแแ แแแกแแแแชแ แจแแแแฎแแแ แจแแแฌแแแแแกแ แแแกแฉแแแแแ, แแแแแแฅแแก แกแแแแแแกแแ.
แแงแแแแแ, แแแแแแฅแแแแ แแแแแแแแแ แแแ แแแแแแ แกแแแงแ แ แฐแฅแแแแแแแกแแแ. แกแแขแแ แแ, แฌแแฎแกแแแแ, แแฅแแแแกแแแแแแ แแแแแฎแแแ แแแแแกแชแ แแแแแจแแจแแก, แแขแแแฃแ แกแ แแแชแแแแ แแขแแแฃแ แกแ แขแแขแ แแกแขแแแ, แแแจแแแแ. แแชแแชแแแ แฌแแแแ, แแงแแแแ.
แกแแแงแ แ, แแจแแแแแแแแ แแแแแกแชแ แฃแแ แแแแแแแแแ แกแแแแขแ แแแแกแแฎแแก แขแแ แกแแแ แกแแแงแ แ? แแแแแจแแจแแก แกแแแแ! แแแ แแแแแแ แแแแชแ. แฃแแแแแแแ แแฅแแแแกแแแแแแ แแแฎแกแแแแ แแแแแก แแแแ แแชแ แแขแแแฃแ แกแ แแแแฎแ แแก แแแแแแฐแฎแแแ.'
Note that none of the words generated occur in the training dataset (the poem), but rather are built to mimic underlying constructs of the language. This makes the text feel fully Georgian while actually meaning nothing (which is good, since you don't need to worry about awkward permutation that might ever occur).
Alternatively, you can load up your own wordlist if you want.
anbani.lorem.loadWordlist(["แแแแแแ", "แแแแแแแแแแฃแแ", "แกแแแแแแแแจแ", "แฉแแแแแแแแแฃแแ"])
anbani.lorem.sentences(7)
// 'แแแแแแแแแแฃแแ แแแแแแ แฉแแแแแแแแแฃแแ แแแแแแ! แแแแแแแแแแฃแแ แฉแแแแแแแแแฃแแ แกแแแแแแแแจแ.'As some bonus features, you can calculate letter frequency of the text and Friedman score (coincidence index).
var text = "แแงแ แแ แแแแแก แ แแกแขแแแแ แแแคแ แฆแแ แแแกแแแแ แกแแแแแ"
anbani.toolkit.friedman(text)
// 0.06116642958748222
anbani.toolkit.frequency(text)
/*
{
'แ': 0.09302325581395349,
'แง': 0.023255813953488372,
'แ': 0.046511627906976744,
'แ': 0.13953488372093023,
'แ ': 0.06976744186046512,
'แ': 0.023255813953488372,
'แ': 0.09302325581395349,
'แ': 0.046511627906976744,
'แก': 0.09302325581395349,
'แข': 0.023255813953488372,
'แ': 0.046511627906976744,
'แ': 0.06976744186046512,
'แ': 0.046511627906976744,
'แค': 0.023255813953488372,
'แฆ': 0.023255813953488372,
'แ': 0.023255813953488372
}
*/Here's a RunKit note for the package https://npm.runkit.com/anbani
const anbani = require("anbani")
// Core module
console.log( anbani.core.convert("แฅแแ แแฃแแ แแแแแแ", "แแฎแแแ แฃแแ", "แจแแแแซแแกแแฃแแ") )
console.log( anbani.core.interpret("vefxistyaosani", "asomtavruli") )
// Lorem module
console.log( anbani.lorem.sentences(7) ) // param: number of words in total
console.log( anbani.lorem.paragraphs(10, 2) ) // params: number of words per paragraph, number of paragraphs
anbani.lorem.loadWordlist(["แแแ", "แแแแ"]) // load custom dataset
console.log( anbani.lorem.sentences(7) )
console.log( anbani.lorem.names(3) ) // param: number of names
// Working with texts
var text = `แ แแแแแแแ แจแแฅแแแ แกแแแงแแ แ แซแแแแแ แแแ แซแแแแ แแแ,
แแแแแ แแแ แแ แกแแ แกแฃแแแแ แงแแแ แแแชแแ แแแแแแแ แแแ,
แฉแแแ, แแแชแแ, แแแแแชแ แฅแแแงแแแ, แแแแฅแแก แฃแแแแแแแ แคแแ แแแ,
แแแกแแแ แแ แก แงแแแแ แฎแแแแฌแแคแ แกแแฎแแแ แแแก แแแแ แแแ.`
console.log(`Friedman score: ${anbani.toolkit.friedman(text)}`)
var converted = anbani.core.convert(text, "mkhedruli", "khutsuri")
console.log(`The given text is in '${anbani.core.classify(converted)}' style`)
Ported from anbani.py: expand/contract Georgian abbreviations, georgianise sloppy qwerty into Georgian, latinise back, and tokenize.
anbani.nlp.contractions.expandText("แแแแฎแแ แ. แจ.")
// 'แแแแฎแแ แแกแ แจแแแแแ'
anbani.nlp.georgianisation.georgianise("gamarjoba") // default 'balanced'
// 'แแแแแ แฏแแแ'
anbani.nlp.georgianisation.georgianise("gamarjoba", "fast") // no ngram table
anbani.nlp.preprocessing.wordTokenize("แแแแแ แฏแแแ, แแกแแคแแแ!")
// ['แแแแแ แฏแแแ', 'แแกแแคแแแ']georgianise's balanced mode uses a ~400KB ngram table that ships for Node only; in the browser bundle it throws (use fast). accurate mode is a Python-only extra.
Installing the package also installs an anbani command:
anbani interpret "gamarjoba" # -> แฒแฒแฒแฒแฒ แฒฏแฒแฒแฒ
anbani convert "แแแแแแ" mkhedruli asomtavruli
anbani georgianise "gamarjoba"
anbani expand "แแแแฎแแ แ. แจ."
anbani lorem 8New in 3.1: a full-screen terminal UI. Launch it with anbani tui, or just run
anbani with no arguments inside a terminal (piped/non-TTY use still prints the
usage help). Zero extra dependencies โ it is hand-rolled ANSI.
anbani tuiFive tabs, switch with 1โ5 or tab / shift+tab:
| Tab | What it does |
|---|---|
| Converter | live transliteration; m toggles auto/manual, f/o pick source/target, s swaps |
| Alphabet | letter grid + detail card; hjkl to move, c cycles script, a toggles archaic, enter copies |
| Lorem | fake Georgian text; k kind, +/- amount, g generate |
| NLP | georgianise / latinise / expand / contract; m mode, b georgianise level |
| Toolkit | letter-frequency bars + Friedman index of coincidence |
Converter โ live transliteration with script auto-detection:
Alphabet โ grid + per-letter detail across every Georgian script, IPA, braille, numeral:
NLP โ georgianise / latinise / expand / contract:
Toolkit โ letter-frequency bars and the Friedman index of coincidence:
Global keys: ? help overlay ยท i/enter edit ยท y copy (via OSC 52) ยท
q or ctrl+c quit. Minimum terminal size is 60ร16.
Notes:
- No Georgian keyboard? Pick
from: qwertyin the Converter (type Latin, get Georgian), or paste โ bracketed paste is supported in edit mode. - Copy uses OSC 52; some terminals block it, in which case the copy silently does nothing.
anbani.js and anbani.py share one behavior contract, proved in CI by the byte-identical spec/golden.json both test suites run. Feature-equivalent as of 3.0; the only intentional gaps are the browser/UMD bundle (js-only) and ebook2text (Python-only).
- New
core.classifyโ the blessed name for script classification (matches thecore.classifyid in the cross-language golden spec). core.$is now a callable alias ofcore.classify:core.$(text),core.classify(text)and the oldercore.$.classifyText(text)all work and return the same thing. Previouslycore.$was an object, socore.$(text)threw.core.interpret(null)/interpret(undefined)now throw like other undetectable input (was a silentundefined).- Removed the unused
utils.isUnsupported.
- Interactive terminal UI:
anbani tui(or runanbaniwith no arguments on a TTY).
- Package is now GPL-3.0 (was MIT); ESM by default (
"type":"module"+exportsmap) โ deep imports ofsrc/lib/*are no longer allowed, use the public API. core.convert/core.interpretthrow anErroron an unsupported source or target (was a silent passthrough).core.interpretthrows when the source script can't be detected (mixed / undetectable input);utils.classifyTextreturns"unknown"there and reports the four bicameral scripts.
The code is under the GPL-3.0 license, freely distributed for anyone who wants to use it (just don't forget to mention the source).
Pull requests and collabs are most welcome!




