Add Iñupiatun Orthography
This commit is contained in:
parent
7c7f7bff0f
commit
388871958d
|
@ -23,6 +23,12 @@ This is best learned by experimenting.
|
|||
|
||||
Inuktitut Syllabics: https://en.wikipedia.org/wiki/Inuktitut_syllabics
|
||||
|
||||
Iñupiatun Orthography:
|
||||
|
||||
* & for miniscule ł
|
||||
* l% and n% for ł and ñ each
|
||||
* g^, l^, &^ (or l%^ and l^%) n^, and r^ for ġ ḷ ł̣ ŋ ȓ each
|
||||
|
||||
These conversions were originally taken from [xsduan/conniebot](https://github.com/xsduan/conniebot), and the discord bot Tuugaalikkuluk (thanks!) But have later divirged a bit.
|
||||
|
||||
To use the bot I run an instance at [@wug:dodsorf.as](https://matrix.to/#/@wug:dodsorf.as), you can invite it to a room or DM it to use the converter. Or you can read the setup instructions below to host your own!
|
||||
|
|
41
index.ts
41
index.ts
|
@ -1,4 +1,4 @@
|
|||
const version = "2.0.2";
|
||||
const version = "2.1.1";
|
||||
import x2i from "./x2i";
|
||||
import { existsSync } from "fs";
|
||||
|
||||
|
@ -26,6 +26,8 @@ async function handle(roomId, event) {
|
|||
if (event.sender === await myself) { console.log("Wait a minute... That's me!"); return;};
|
||||
|
||||
if (event.content.body === "!xhelp" || event.content.body === (await client.getUserProfile(await myself)).displayname + ": help") {help(roomId); return;};
|
||||
if (event.content.body === "!xik") {xik(roomId); return;};
|
||||
if (event.content.body === "!pie") {xpie(roomId); return;};
|
||||
if (event.content.body === "!xdebug") {debug(roomId); return;};
|
||||
|
||||
console.log("Trying to convert the message!");
|
||||
|
@ -38,17 +40,48 @@ async function handle(roomId, event) {
|
|||
|
||||
|
||||
function help(roomId) {
|
||||
var message = `Hi I can help you translate X-SAMPA, Z-SAMPA to IPA, and transcribe into proto-indo european notation!
|
||||
Use (x/z/p) together with either / or [] as delimeters
|
||||
var message = `Hi I can help you translate X-SAMPA, Z-SAMPA to IPA!
|
||||
Use (x/z/p/i/ik) together with either / or [] as delimeters
|
||||
x/"hEloU/ z[or\` 5aIk DIz] p/mreghnom/ 😀
|
||||
|
||||
I also can transcribe to Inuktitut Syllabics like this: i[tusaumaqattautijjutinik aulattijiit].
|
||||
x - X-SAMPA - https://en.wikipedia.org/wiki/X-SAMPA
|
||||
z - Z-SAMPA - http://www.kneequickie.com/kq/Z-SAMPA
|
||||
p - Proto-Indo-European Notation (see !xpie)
|
||||
i - Inuktitut Syllabics | https://en.wikipedia.org/wiki/Inuktitut_syllabics
|
||||
ik - Iñupiatun Orthography (see !xik)
|
||||
|
||||
Find my source at https://github.com/Dali99/matrix-wug`;
|
||||
|
||||
client.sendNotice(roomId, message);
|
||||
}
|
||||
|
||||
function xpie(roomId) {
|
||||
var message = `This is a fun PIE notation
|
||||
|
||||
a preceding " is acute accent
|
||||
a following : is the macron
|
||||
a following . is the syllabicity marker
|
||||
h always becomes superscript and v is superscript w.
|
||||
Palato-velars are marked with a following ' and x1, x2, x3 etc. yields the laryngeals, with x@ for the subscript a laryngeal, and xx for an unknown laryngeal.
|
||||
|
||||
There's probably more, but this is best learned by experimenting (or reading https://github.com/dali99/matrix-wug/blob/master/x2i/apie-keys.yaml)
|
||||
|
||||
Thanks to conniebot (xsduan) for the encoding`;
|
||||
|
||||
client.sendNotice(roomId, message);
|
||||
}
|
||||
|
||||
function xik(roomId) {
|
||||
var message = `There are several distinct Iñupiatun orthographies, and I can type all of them.
|
||||
& for miniscule ł
|
||||
l% and n% for ł and ñ each
|
||||
g^, l^, &^ (or l%^ and l^%) n^, and r^ for ġ ḷ ł̣ ŋ ȓ each
|
||||
|
||||
Thanks to Tuugaalikkuluk for the encoding`;
|
||||
|
||||
client.sendNotice(roomId, message);
|
||||
}
|
||||
|
||||
async function debug(roomId) {
|
||||
var message = `Hi my name is ${await myself}, and I want to help you debug me!
|
||||
I run version ${version} 💝 and currently reside in ${roomId}`;
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
- - l^%
|
||||
- ł̣
|
||||
- - l%^
|
||||
- ł̣
|
||||
- - L^%
|
||||
- Ł̣
|
||||
- - L%^
|
||||
- Ł̣
|
||||
|
||||
- - g^
|
||||
- ġ
|
||||
- - G^
|
||||
- Ġ
|
||||
- - l^
|
||||
- ḷ
|
||||
- - l%
|
||||
- ł
|
||||
- - L^
|
||||
- Ḷ
|
||||
- - L%
|
||||
- Ł
|
||||
- - '&^'
|
||||
- ł̣
|
||||
- - N%
|
||||
- Ñ
|
||||
- - N^
|
||||
- Ŋ
|
||||
- - n%
|
||||
- ñ
|
||||
- - n^
|
||||
- ŋ
|
||||
- - r^
|
||||
- ȓ
|
||||
- - R^
|
||||
- Ȓ
|
||||
|
||||
- - '&'
|
||||
- ł
|
|
@ -37,6 +37,10 @@ const regex = OuterXRegExp(
|
|||
const defaultMatchAction = (left: string, match: string, right: string) => left + match + right;
|
||||
|
||||
const matchType: { [key: string]: IMatchInstructions } = {
|
||||
ik: {
|
||||
join: (_, match) => `- ${match}`,
|
||||
keys: readKeys("./x2i/ik-keys.yaml"),
|
||||
},
|
||||
p: {
|
||||
join: (_, match) => `*${match}`,
|
||||
keys: readKeys("./x2i/apie-keys.yaml"),
|
||||
|
@ -48,7 +52,7 @@ const matchType: { [key: string]: IMatchInstructions } = {
|
|||
keys: readKeys("./x2i/z2i-keys.yaml"),
|
||||
},
|
||||
i: {
|
||||
join: (_, match) => `|${match}|`,
|
||||
join: (_, match) => `- ${match}`,
|
||||
keys: readKeys("./x2i/i-keys.yaml"),
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue