ambuda-org / vidyut

Infrastructure for Sanskrit software. For Python bindings, see `vidyut-py`.
48 stars 21 forks source link

[Feature Request] Support for non-Devnagari transliteration #42

Closed ma08 closed 1 year ago

ma08 commented 1 year ago

Hi,

Great project!! Really interesting and inspiring.

Are you interested in adding support for non-Devnagari transliteration, maybe one or all of IAST, ITRANS, SLP1? Will be useful for folks with difficulty in reading Devnagari.

I would love to contribute to developing this feature. Maybe for a start, we could implement a small transient popup that shows the transliteration(s) near the pointer on extended mouse hover?

akprasad commented 1 year ago

Thanks for filing this issue!

Yes, I'm very interested in having a fast and standard transliteration engine. If it's implemented in Rust, we can have a single engine for both backend and frontend work. Ideally we can have a port of https://github.com/virtualvinodh/aksharamukha-python, which is generally the most sophisticated transliterator available for Sanskrit.

As for the transliteration itself, there is a PR in progress at #39 that @mudgebiscuit is working on. @mudgebiscuit -- as you can see, @ma08 is eager to help with this work. Is there something related to your PR that he can get involved with?

(As a reminder, Vidyut is a backend engine -- its goal is to be infrastructure for other projects, and it doesn't have a frontend of its own. Our Vidyullekha demo https://ambuda-org.github.io/vidyullekha/ , which you might have had in mind, is simply a demo/debugger for the backend code. But I'm happy to receive a PR there to switch the script if that's something you're excited about -- could be a dropdown that, when changed, just changes the script used on the frontend.)

ma08 commented 1 year ago

Thanks for the quick response and the info @akprasad! I realize I should learn more about the ecosystem of ambuda. I will go through the docs to understand it more. I was a bit eager to get started and posted this issue!

So the Vidyullekha demo is hosted using the https://github.com/ambuda-org/ambuda-org.github.io repo which has the static content?

akprasad commented 1 year ago

No problem -- I love the enthusiasm! :)

So the Vidyullekha demo is hosted using the https://github.com/ambuda-org/ambuda-org.github.io repo which has the static content?

Yes -- it's a copy of the files we generate here.

Basic project layout and terms:

Long-term, Ambuda will be a comprehensive library of Sanskrit literature and associated tools, like corpus search etc. Long-term, Vidyut will be the stable, fast, and reliable backend layer that supports all of the difficult computational work that projects like Ambuda need.

ma08 commented 1 year ago

Got it! Thanks for the links and the summary, the reason I am partial to this particular feature is because it would let me appreciate the demo/backend more. Currently I am having a hard time consuming the text on the demo for Vidyullekha.

As for the dropdown for the script, I can probably use one similar to what's implemented here https://en.amarahasa.com/start-here/. Where can I find the source code for that?

akprasad commented 1 year ago

Amarahasa is using some older code. Instead, I suggest that you update app.js to have a new script variable in const App. Then, update dev and devaNoSvara to translate to this.script. Finally, add your dropdown in index.html with x-model=script. That should broadly do the trick -- when the dropdown is changed, script will be updated, and that will cause deva and devaNoSvara to re-run automatically.

Useful docs:

ma08 commented 1 year ago

Thanks @akprasad for the detailed pointers!! I will get started on these.