Skip to content

Script converters for Ancient Indo-European writing systems

License

Notifications You must be signed in to change notification settings

caiogeraldes/pieoffice-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

62 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

pieoffice-js

This is a simple module built for those who need or would like to type in the writings systems for ancient Indo-European languages.

The project is currently working as an web app pieoffice-site.

Usage

Instalation

With npm:

npm install pieoffice

With yarn:

yarn add pieoffice

Importing it

If you desire to import only one of the transliteration schemes, say that for Avestan Script, you could add it on your .js file the following:

import { avestan } from "pieoffice";

After importing, function avestan() will be available, so for example:

console.log(avestan("mazdA")); // ๐ฌจ๐ฌ€๐ฌฐ๐ฌ›๐ฌ

There is also a allConverters array built to work with react-select components, example from my implementation on pieoffice-site:

import { allConverters } from "pieoffice";

...

const LangSelect = () => {

    const handleChange = (e) => {
            converter = e.converter;
    }

    return (
        <Select
            placeholder={"Select a script"}
            onChange={handleChange}
            options={allConverters}
        />
    );
}

Transliteration schemes

Proto-Indo-European pie(input)

Follows closely the Harvard-Kyoto transliteration scheme for Sanskrit. Resonants are encoded as uppercase, accents as slashes. w' = w; k', g' = แธฑ, วต.

Polytonic Greek polygreek(input)

Transliteration scheme based on BETACODE, including all the major diacritics (breathings, acute, grave, perispomenon and diairesis), breve and macron, koppa (including the archaic) and some bits and pieces. The full support for betacode is still a work in progress.

Linear B linearb(input)

Glyphs with known syllabic values should be written in lower-case, syllabically and numbered if +2. Glyphs with known logographic values should be written in upper-case. The only exception for said rule are the gendered logograms, which should be followed without space by a f or m. Glyphs with unknown value should be written with an asterisk followed by the number (2 or 3 digits).

This conversion scheme supports Aegean numbers and measurements.

Example:
po-ro EQUf 120 --> ๐€ก๐€ซ ๐‚„ ๐„™๐„‘

Cypriot Syllabary cypriot(input)

a ๐ € e ๐  i ๐ ‚ o ๐ ƒ u ๐ „
wa ๐ ฒ we ๐ ณ wi ๐ ด wo ๐ ต
za / ga ๐ ผ zo ๐ ฟ
ja ๐ … jo ๐ ˆ
ka ๐ Š ke ๐ ‹ ki ๐ Œ ko ๐  ku ๐ Ž
la ๐  le ๐  li ๐ ‘ lo ๐ ’ lu ๐ “
ma ๐ ” me ๐ • mi ๐ – mo ๐ — mu ๐ ˜
na ๐ ™ ne ๐ š ni ๐ › no ๐ œ nu ๐ 
pa ๐ ž pe ๐ Ÿ pi ๐   po ๐ ก pu ๐ ข
ra ๐ ฃ re ๐ ค ri ๐ ฅ ro ๐ ฆ ru ๐ ง
sa ๐ จ se ๐ ฉ si ๐ ช so ๐ ซ su ๐ ฌ
ta ๐ ญ te ๐ ฎ ti ๐ ฏ to ๐ ฐ tu ๐ ฑ
ksa ๐ ท kse ๐ ธ

Armenian armenian(input), armenianTranslitIso(input), armenianTranslitClassic

a ีก b ีข g ีฃ d ีค e ีฅ
z ีฆ ee ีง e' ีจ t' ีฉ
zh ีช i ีซ l ีฌ x ีญ c ีฎ
k ีฏ h ีฐ j ีฑ g. ีฒ l. ีฒ
ch. / c'h ีณ m ีด y ีต n ีถ sh ีท
o ีธ ch ีน p ีบ jh ีป r. ีผ
s ีฝ v ีพ t ีฟ r ึ€ c' ึ
w ึ‚ p' ึƒ k' ึ„ o' ึ… f ึ†
u ีธึ‚ ew ึ‡ ? ีž . ึ‰ .' ี
; ีŸ ;' ี› ! ีœ `` ยซ '' ยป

For the particulars of the transliteration schemes, see the article on Wikipedia.

Vedic / Sanskrit hk_deva(input), hk_iast(input), hk_iso(input)

Use the Harvard-Kyoto encoding for both outputs. Udatta (only for IAST), anudatta and svarita are assigned by /, =, and \ after the vowel (or vowel + M), but the script also converts text marked with udatta to devanagari with anudatta and svarita notation (BETA).

Avestan avestan(input), avestanTranslit(input)

a a ๐ฌ€ A ฤ ๐ฌ รก รฅ ๐ฌ‚ ร ฤฬŠ ๐ฌƒ รฃ ฤ… ๐ฌ„ รฃรฃ ฤ…ฬ‡ ๐ฌ…
รฆ ษ™ ๐ฌ† ร† ษ™ฬ„ ๐ฌ‡ e e ๐ฌˆ E ฤ“ ๐ฌ‰ o o ๐ฌŠ O ล ๐ฌ‹
i i ๐ฌŒ I ฤซ ๐ฌ u u ๐ฌŽ U ลซ ๐ฌ k k ๐ฌ x x ๐ฌ‘
X xฬ ๐ฌ’ xw xแต› ๐ฌ“ g g ๐ฌ” G ฤก ๐ฌ• gh ฮณ ๐ฌ– c ฤ ๐ฌ—
j วฐ ๐ฌ˜ t t ๐ฌ™ th ฯ‘ ๐ฌš d d ๐ฌ› dh ฮด ๐ฌœ T tฬฐ ๐ฌ
p p ๐ฌž f f ๐ฌŸ b b ๐ฌ  B ฮฒ ๐ฌก ng ล‹ ๐ฌข ngH ล‹ฬ ๐ฌฃ
ngW ล‹ ๐ฌค n n ๐ฌฅ รฑ ล„ ๐ฌฆ N แน‡ ๐ฌง m m ๐ฌจ M mฬจ ๐ฌฉ
แบŽ แบ ๐ฌช y y ๐ฌซ v v ๐ฌฌ r r ๐ฌญ s s ๐ฌฏ z z ๐ฌฐ
sh ลก ๐ฌฑ zh ลพ ๐ฌฒ shy ลกฬ ๐ฌณ S แนฃฬŒ ๐ฌด h h ๐ฌต

If you find it troublesome to type รฆ in your keyboard, try Alt gr + a, else try using รช.

Old Persian Cuneiform oldpersian(input)

a ๐Ž  i ๐Žก u ๐Žข k ๐Žฃ ku ๐Žค x ๐Žง xi ๐Žง
xu ๐Žง g ๐Žฅ gu ๐Žฆ c ๐Žจ รง ๐‚ j ๐Žฉ ji ๐Žช
t ๐Žซ ti ๐Žซ tu ๐Žฌ th ๐Žฐ d ๐Žญ di ๐Žฎ du ๐Žฏ
p ๐Žฑ f ๐Žณ b ๐Žฒ n ๐Žด ni ๐Žด nu ๐Žต m ๐Žถ
mi ๐Žท mu ๐Žธ y ๐Žน v ๐Žบ vi ๐Žป r ๐Žผ ri ๐Žฝ
l ๐Žพ s ๐Žฟ z ๐€ ลก ๐ sh ๐ h ๐ƒ
ahuramazda1 ๐ˆ ahuramazda2 ๐‰ ahuramazda3 ๐Š
xshayathia ๐‹ dahyaus1 ๐Œ dahyaus2 ๐Œ
baga ๐Ž bumis ๐

Gothic gothic(input)

a ๐Œฐ b ๐Œฑ g ๐Œฒ d ๐Œณ e ๐Œด q ๐Œต z ๐Œถ
h ๐Œท th ๐Œธ i ๐Œน k ๐Œบ l ๐Œป m ๐Œผ n ๐Œฝ
j ๐Œพ u ๐Œฟ p ๐€ q' ๐ r ๐‚ s ๐ƒ t ๐„
w ๐… f ๐† x ๐‡ hw ๐ˆ o ๐‰ z' ๐Š

Hittite hittite(input)

I tried to keep the system as flexible as possible allowing diacritics (zรก) and numerical typing (za2). So far it only covers the signs used in Van den Hout's textbook, with many issues concerning the fonts which employ workarounds to cover the Unicode chart's shortcomings. If you use either HPM or Ullikummi font it should be properly displayed, even if not in the browser. I strongly recommend to check the file at src/converters if you can not figure out how to type a value, I'm manually including the HZL numbers for future proofing. Please feel free to report any inconsistencies.

The rules for 10 ๐”—, 100 ๐”—ƒ, and 1000 ๐”—„ are currently unavailable. If necessary, use the forms DECEM, CENTUM and MILLE for them.

Example:

input: [ UM-MA 'd-UTU]-SI 'm-mur-si-li LUGAL-GAL LUGAL KUR ha-at-ti UR-SAG [ DUMU 'm-su-up-]pรญ-lu-li-u-ma LUGAL-GAL UR-SAG ku-it-ma-an-za-kรกn ANA GIS-GU-ZA ABI-IA na-[wi5] e-es-ha-at nu-mu a-ra-as-zรฉ-na-as KUR-KUR-MES Lรš-KรšR hu-u-ma-an-te-es ku-u-ru-ri-ia-ah-he-er nu-za ABU-IA ku-wa-pรญ DINGIR-LIM-is Dร™-at 'm-ar-nu-an-da-as-ma-za-kรกn SES-IA ANA GIS-GU-ZA ABI-SU e-sa-at EGIR-an-ma-as ir-ma-li-ia-at-ta-at-pรกt ma-ah-ha-an-ma KUR-KUR-MES Lรš-KรšR 'm-ar-nu-an-da-an SES-IA ir-ma-an is-ta-ma-as-ser nu KUR-KUR-MES Lรš-KรšR ku-u-ru-ri-ia-ah-hi-is-ke-u-an da-a-[er] output: [ ๐’Œ๐’ˆ  ๐’€ญ๐’Œ“]๐’…† ๐’น๐’„ฏ๐’…†๐’‡ท ๐’ˆ—๐’ƒฒ ๐’ˆ— ๐’†ณ ๐’„ฉ๐’€œ๐’‹พ ๐’Œจ๐’Š• [ ๐’Œ‰ ๐’น๐’‹—๐’Œ’]๐’‰๐’‡ป๐’‡ท๐’Œ‹๐’ˆ  ๐’ˆ—๐’ƒฒ ๐’Œจ๐’Š• ๐’†ช๐’€‰๐’ˆ ๐’€ญ๐’๐’ƒท ๐’€€๐’ˆพ ๐’„‘๐’„–๐’ ๐’€€๐’‰๐’…€ ๐’ˆพ[๐’ƒพ] ๐’‚Š๐’Œ๐’„ฉ๐’€œ ๐’‰ก๐’ˆฌ ๐’€€๐’Š๐’€ธ๐’ข๐’ˆพ๐’€ธ ๐’†ณ๐’†ณ๐’ˆฉ ๐’‡ฝ๐’‰ฝ ๐’„ท๐’Œ‹๐’ˆ ๐’€ญ๐’‹ผ๐’Œ ๐’†ช๐’Œ‹๐’Š’๐’Š‘๐’…€๐’„ด๐’„ญ๐’…• ๐’‰ก๐’ ๐’€€๐’๐’…€ ๐’†ช๐’‰ฟ๐’‰ ๐’€ญ๐’…†๐’…– ๐’†•๐’€œ ๐’น๐’…ˆ๐’‰ก๐’€ญ๐’•๐’€ธ๐’ˆ ๐’๐’ƒท ๐’‹€๐’…€ ๐’€€๐’ˆพ ๐’„‘๐’„–๐’ ๐’€€๐’‰๐’‹— ๐’‚Š๐’Š“๐’€œ ๐’‚•๐’€ญ๐’ˆ ๐’€ธ ๐’…•๐’ˆ ๐’‡ท๐’…€๐’€œ๐’‹ซ๐’€œ๐’ ๐’ˆ ๐’„ด๐’„ฉ๐’€ญ๐’ˆ  ๐’†ณ๐’†ณ๐’ˆฉ ๐’‡ฝ๐’‰ฝ ๐’น๐’…ˆ๐’‰ก๐’€ญ๐’•๐’€ญ ๐’‹€๐’…€ ๐’…•๐’ˆ ๐’€ญ ๐’…–๐’‹ซ๐’ˆ ๐’€ธ๐’‹“ ๐’‰ก ๐’†ณ๐’†ณ๐’ˆฉ ๐’‡ฝ๐’‰ฝ ๐’†ช๐’Œ‹๐’Š’๐’Š‘๐’…€๐’„ด๐’„ญ๐’…–๐’† ๐’Œ‹๐’€ญ ๐’•๐’€€[๐’…•]

Hieroglyphic Luwian luwian(input)

Glyphs with known syllabic values should be written in lower-case, syllabically and with the proper diacritic or numbered if +4. Glyphs with known logographic values should be written in upper-case. Variants of known glyphs should be followed by one or more dots (.), generally the undotted variant is the more frequent one. Glyphs with unknown value should be written with an asterisk followed by the number (3 digits, including the 0).

Example:

"MAGNUS.REX MAGNUS-TONITRUS MAGNUS.REX HEROS ka-ra-ka-mi-sร  REGIO REX || X-pa-VIR-ti-sa MAGNUS.REX HEROS INFANS-nรญ-mu-za || wa-tu-tรก-a CORNU-ra-ti REGIO LIS arha.-SPHINX || *273"\ ๐”’ ๐”–™๐”“ข ๐”’ ๐”• ๐”•ข๐”—ท๐”—ง๐”–ป๐”‘ถ ๐””† ๐”‘ || X๐”•ธ๐”• ๐”‘ฃ๐”—” ๐”’ ๐”• ๐”ฐ๐”“ต๐”‘พ๐”–ช || ๐”—ฌ๐”‘ข๐”ž๐”—ท ๐”’‚๐”–ฑ๐”‘ฃ ๐””† ๐”˜ ๐”“น๐”’’ || ๐””ด

Lydian lydian(input)

a ๐ค  b,p ๐คก g ๐คข d ๐คฃ e ๐คค v,w ๐คฅ i ๐คฆ
y ๐คง k ๐คจ l ๐คฉ m ๐คช n ๐คซ o ๐คฌ r ๐คญ
S,ล› ๐คฎ t ๐คฏ u ๐คฐ f ๐คฑ q ๐คฒ s,sh ๐คณ T ๐คด
รฃ ๐คต A ๐คต แบฝ ๐คถ E ๐คถ L ๐คท N ๐คธ c ๐คน
. ๎คฟ

Lycian lycian(input)

a ๐Š€ b ๐Š‚ g ๐Š„ d ๐Š… i ๐Š† w ๐Š‡
z ๐Šˆ h ๐Š› th ๐Š‰ j ๐ŠŠ y ๐ŠŠ k ๐Š‹
l ๐Š m ๐ŠŽ n ๐Š u ๐Š’ p ๐Š“ k ๐Š”
r ๐Š• s ๐Š– t ๐Š— e ๐Š รฃ ๐Š™ แบฝ ๐Šš
M ๐Š N ๐Š‘ T ๐Š˜ q ๐ŠŒ B ๐Šƒ x ๐Šœ

Carian carian(input)

a ๐Š  b ๐Šก d ๐Šข l ๐Šฃ y ๐Šค y2 ๐‹
r ๐Šฅ L ๐Šฆ L2 ๐‹Ž A2 ๐Šง q ๐Šจ b ๐Šฉ
m ๐Šช o ๐Šซ D2 ๐Šฌ t ๐Šญ sh ๐Šฎ sh2 ๐Šฏ
s ๐Šฐ 18 ๐Šฑ u ๐Šฒ N ๐Šณ c ๐Šด n ๐Šต
T2 ๐Šถ p ๐Šท 's,ล› ๐Šธ i ๐Šน e ๐Šบ รฝ,'y ๐Šป
k ๐Šผ k2 ๐Šฝ dh ๐Šพ w ๐Šฟ G ๐‹€ G2 ๐‹
z2 ๐‹‚ z ๐‹ƒ ng ๐‹„ j ๐‹… 39 ๐‹† T ๐‹‡
y3 ๐‹ˆ r2 ๐‹‰ mb ๐‹Š mb2 ๐‹‹ mb3 ๐‹Œ mb4 ๐‹
e2 ๐‹

Ogham ogham(input)

b แš l แš‚ w แšƒ s แš„
n แš… j แš† h แš† d แš‡
t แšˆ k แš‰ kw แšŠ c แš‰
cw แšŠ m แš‹ g แšŒ gw แš
S แšŽ r แš a แš o แš‘
u แš’ e แš“ i แš” ,ear, แš•
,or, แš– ,uilleann, แš— ,ifin, แš˜ ,eam, แš™
,peith, แšš > แš› < แšœ

Oscan oscan(input)

a ๐Œ€ b ๐Œ g,k ๐Œ‚ d ๐Œƒ e ๐Œ„ v ๐Œ… z ๐Œ†
h ๐Œ‡ i ๐Œ‰ l ๐Œ‹ m ๐ŒŒ n ๐Œ p ๐Œ ล› ๐Œ‘
r ๐Œ“ s ๐Œ” t ๐Œ• u ๐Œ– f ๐Œš รบ ๐Œž รญ ๐Œ

Glagolitic glagolitic(input)

a โฐ€ b โฐ v โฐ‚ g โฐƒ d โฐ„ e โฐ…
zh โฐ† dz โฐ‡ z โฐˆ ii โฐ‰ iy โฐŠ i โฐ‹
j โฐŒ k โฐ l โฐŽ m โฐ n โฐ o โฐ‘
p โฑ‚ r โฐ“ s โฐ” t โฐ• u โฐ– f โฐ—
x โฐ˜ oo โฐ™ w โฐ™ sht โฐ› ts โฐœ ch โฐ
sh โฐž '' โฐŸ 'i โฐŠ ' โฐ  ya โฐก yo โฐฆ
yu โฐฃ แบฝ โฐค e~ โฐค yแบฝ โฐง ye~ โฐง รต โฐจ
o~ โฐจ yรต โฐฉ yo~ โฐฉ th โฐช v โฐซ

Acknowledgments

  • Obrigado Alex por indicar alguns erros crassos que tinham passado despercebidos em Grego e Avesta.
  • Obrigado Thiago, por notar que o antigo IAST do vรฉdico era um misto de IAST com ISO.