Closed shreevatsa closed 1 year ago
The async is kind of weird but it works, and loading sutrapatha.json
doesn't block the rest of the app from loading, so this is probably best? Please take a look whether it's ready to merge.
Aside: note that transliterating to SLP1 makes it hard (AFAICT) to recover the original Devanagari (which is debatable in the first place) for:
— see https://github.com/indic-transliteration/indic_transliteration_py/issues/75 (this is the kind of thing that I'm hoping a Rust transliteration library would fix by being "pedantic" and requiring specifying a strategy instead of making ad-hoc choices, but it's probably fine for now).
Made a small change, updated screenshot (tested with manual removal of "1.3.9": "tasya lopaH"
from sutrapatha.json
) — no error messages in JS console:
wonderful -- thank you!!
this is the kind of thing that I'm hoping a Rust transliteration library would fix by being "pedantic" and requiring specifying a strategy instead of making ad-hoc choices, but it's probably fine for now).
I'd love to discuss this with you further now that we have a starter implementation (https://ambuda-org.github.io/vidyut-lipi/).
Hacky code for https://github.com/ambuda-org/vidyut/issues/26 , but it actually seems to work:
Before merging I guess at minimum we should copy over https://raw.githubusercontent.com/ashtadhyayi-com/data/master/sutraani/data.txt so that it's hosted here — maybe convert it to a simple
data/sutrapatha.tsv
as suggested at https://github.com/ambuda-org/vidyut/issues/26#issuecomment-1369427224 that has entries like— but just pushing this commit for now as a savepoint for when I return to this later (not today). (Or if I don't return 😱 )
(Curious how much faster it will get when we change from array of 4000 items to JS object for faster lookup…)