Public
Edited
Feb 26
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
convert = {
const to = {}, from = {};
for (const [l, a] of pairs) {
to[l] = a;
from[a] = l;
}
const conversion = (input, dict) => {
let output = "";
for (let i = 0; i < input.length; i++) {
const c = input[i];
const maybeDiacretic = c + input[i+1];
const diacretic = dict[maybeDiacretic];
if (diacretic) {
output += diacretic;
i++;
} else {
output += dict[c] || c;
}
}
return output;
};
return {
to: (input) => conversion(input, to),
from: (input) => conversion(input, from),
dict: {to, from}
};
}
Insert cell
pairs = `A - A
B - Ȧ
G - A̋
L - Ă
Q - A̤
V - À
C - A̧
H - A̰
M - Ǎ
R - Ȃ
W - Ȁ
D - A̱
I - Ả
N - Â
S - Ã
X - A̽
E - Á
J - A̓
O - Å
T - Ā
Y - A̦
F - A̮
K - Ạ
P - A̯
U - Ä
Z - Ⱥ
a - a
b - ȧ
g - a̋
l - ă
q - a̤
v - à
c - a̧
h - a̰
m - ǎ
r - ȃ
w - ȁ
d - a̱
i - ả
n - â
s - ã
x - a̽
e - á
j - a̓
o - å
t - ā
y - a̦
f - a̮
k - ạ
p - a̯
u - ä
z - ⱥ`.split("\n").map(v => v.split(" - "));
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more