Vidyut | Python API

35 views
Skip to first unread message

Srinidhi B

unread,
May 13, 2026, 12:12:45 PMMay 13
to ambuda-discuss
I have been trying out Vidyut for sometime now. However I noticed some issues. I couldn't find the answers on the documentation. Couple of cases 

Tiṅanta/Kr̥danta Cases:
Trying to derive  श्रोतुम्  but instead, got  श्रवितुम्  
This is how I define the dhātu and aṅga
dhatu = Dhatu.mula(aupadeshika=slp1("Sru", from_devanagari=True), gana=Gana.Bhvadi)
anga = Pratipadika.krdanta(dhatu, Krt.tumun)
Similarly I get ग्मित instead of गत, वचिष्यामि instead of वक्ष्यामि and so on.
Is this because अनिट् / सेट् is not mentioned? if yes, how do we pass it as an argument?

Subanta cases:
1. Couple of words like रोहिणी/देवी/कैकयी/शूर्पणखा etc are generated with visargaḥ रोहिणीः/देवीः/कैकयीः/शूर्पणखाः for prathama, eka vacana
2. (prajA, strI, zazWI, bahu) yields प्रजाम् instead of प्रजानाम्,
 (kzamA, strI, tftIyA, eka) yields क्षमा instead of क्षमया
 (pAdukA, strI, dvitIyA, dvi) yields पादुकौ and not पादुके
 (ayoDyA, strI, zazWI, eka) yields अयोध्याः instead of अयोध्यायाः 

Of course, https://ambuda-org.github.io/vidyullekha gives the expected answers, so perhaps I am missing out something on how to work with the functions.

Would be great, if any one could help me out here.
Thanks!

Arun Prasad

unread,
May 13, 2026, 11:13:17 PMMay 13
to ambuda-discuss
Thanks for trying it out! Apologies for the issues.

Generally, Vidyut tries not to assume anything about the input data and expects input conditions to be specified precisely. For the first case, the issue is that we encode iT through the use of anudatta (\) per https://ashtadhyayi.com/sutraani/7/2/10. So in this case, try using Sru\ (or maybe Sru\\ if you need to escape the backslash), and likewise ga\\mx~ for gam and va\\ca~ for vac. For more examples, see the dhatupatha.tsv data file, which lists all dhatus with the proper svaras.

For the subanta cases, likewise we do not assume by default that the prAtipadika is nyAbanta. So in this case, try using the Pratipadika.nyap constructor https://vidyut.readthedocs.io/en/latest/api.html#vidyut.prakriya.Pratipadika .

While Vidyut's Python, Rust, and WebAssembly builds generally use the same code, the Python and WebAssembly builds expose different degrees of functionality. Rust exposes the most, since everything builds on it; then WebAssembly, since it's very easy to rebuild on top. Our Python releases are relatively infrequent (though we should make them more frequent!), so at times you may find that the Python library does not expose something that is available elsewhere.

Arun

Srinidhi B

unread,
May 21, 2026, 2:19:59 AM (7 days ago) May 21
to ambuda-discuss
Thank you so much for your response.

Was able to try out all of the above.

Arun Prasad

unread,
11:15 PM (1 hour ago) 11:15 PM
to ambuda-discuss
Glad to hear it. We'll update the Python bindings soon.
Reply all
Reply to author
Forward
0 new messages