Skip to content

Fix han+kvip and vocative mat/hat#225

Open
yajnadevam wants to merge 8 commits intoambuda-org:mainfrom
yajnadevam:fix-han-kvip
Open

Fix han+kvip and vocative mat/hat#225
yajnadevam wants to merge 8 commits intoambuda-org:mainfrom
yajnadevam:fix-han-kvip

Conversation

@yajnadevam
Copy link

@yajnadevam yajnadevam commented Feb 3, 2026

Summary

  • Keep 6.4.15 dirgha in place for kvip in general.
  • Skip 6.4.15 only when the dhatu is han.
  • Add vocative singular handling for -mat -> -man (e.g., mAmat -> mAman).
  • Add vocative singular handling for -hat -> -han (e.g., mAmahat -> mAmahan).
  • Regression tests for han+kvip and both vocative cases.

Tests

  • cargo test -p vidyut-prakriya kvip_han_stem
  • cargo test -p vidyut-prakriya satf_yanluk_mat_voc
  • cargo test -p vidyut-prakriya satf_yanluk_hat_voc

Fixes #224

bharathrao and others added 4 commits January 31, 2026 18:15
…dings

Add `nyap` field to `PratipadikaArgs` struct to support feminine stems
with nyāp pratyayas (ṭāp, ṅīp, etc.) in the WebAssembly API.

Add `deriveTaddhitantas` method to support taddhita derivation, allowing
proper derivation of stems like damana + matup → damanavat.

Example usage:
```javascript
// Feminine stems with nyap
vidyut.deriveSubantas({
  pratipadika: { nyap: 'nadI' },
  linga: 'Stri',
  vibhakti: 'Prathama',
  vacana: 'Eka',
})
// Returns: ['nadI']

// Taddhita derivation
vidyut.deriveTaddhitantas({
  pratipadika: { basic: 'damana' },
  taddhita: 'matup',
})
// Returns: ['damanavat']
```

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extends the PratipadikaArgs struct to support taddhitanta type, allowing
proper declension of taddhita-derived stems (like -vat/-mat stems from matup).

This enables stems like "amavat" (from ama + matup) to decline correctly
to "amavAn" for Nom.M.S, following proper Sanskrit grammar rules.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@yajnadevam yajnadevam changed the title Fix han+kvip lengthening Limit 6.4.15 dirgha for han+kvip Feb 3, 2026
@yajnadevam yajnadevam changed the title Limit 6.4.15 dirgha for han+kvip Fix han+kvip and mat->man vocative Feb 3, 2026
@yajnadevam yajnadevam changed the title Fix han+kvip and mat->man vocative Fix han+kvip and vocative mat/hat Feb 3, 2026
@akprasad
Copy link
Contributor

akprasad commented Feb 4, 2026

thanks for the PR, will take a look this weekend

@tbdasap
Copy link
Contributor

tbdasap commented Feb 14, 2026

@yajnadevam : Are you able to run cargo test successfully on your local development ?

@yajnadevam
Copy link
Author

@yajnadevam : Are you able to run cargo test successfully on your local development ?

Yes. I am able to run the test. Updated the PR. Kept the han exception in the 6.4.15 block.

@tbdasap
Copy link
Contributor

tbdasap commented Feb 19, 2026

W.r.t Handle mat -> man vocative

The test case uses mA (adAdi) + yaNluk + Satf and expects mAman.
Is there a shastric reference for this ? Curious about the motivation.
It seems to violate the intent of नाभ्यस्ताच्छतुः

@yajnadevam
Copy link
Author

yajnadevam commented Feb 20, 2026

W.r.t Handle mat -> man vocative

The test case uses mA (adAdi) + yaNluk + Satf and expects mAman. Is there a shastric reference for this ? Curious about the motivation. It seems to violate the intent of नाभ्यस्ताच्छतुः

I essentially followed Ashtadhyayi.com:
https://ashtadhyayi.com/dhatu/02.0057?tab=yangluk_krut&scroll=dhatuform-1020057-yangluk_krut-शतृ&scrollcolor=cyan&scrolloffset=400

Im not certain of the nuances of 7.1.78. ashtadhyayi.com seems to prohibit नुम् for reduplicated main stems but not intensives. see √हु. It is possibly because the आतिदेशिकधातुः = जोहूय is no longer just a reduplicated stem. It is a different root already: 3.1.32 सनाद्यन्ता धातवः

1.1.62 प्रत्ययलोपे प्रत्ययलक्षणम् (“even when an affix is elided, operations conditioned by it still take effect”).
So the system can treat the śatṛ as coming after yaṅ (though lopped) rather than “directly after abhyasta.”

@tbdasap
Copy link
Contributor

tbdasap commented Feb 21, 2026

1.1.62 प्रत्ययलोपे प्रत्ययलक्षणम् (“even when an affix is elided, operations conditioned by it still take effect”).

Good observation. IMO the primary effect is dhatu abhyasa for yaN even if luk.

Reference: See 14th pdf page (page with number 12) example from this PDF from 1929.

It declines बोभुवत् which is भु+यङ्लुक् like मरुत्

I essentially followed Ashtadhyayi.com:
https://ashtadhyayi.com/dhatu/02.0057?tab=yangluk_krut&scroll=dhatuform-1020057-yangluk_krut-शतृ&scrollcolor=cyan&scrolloffset=400
Im not certain of the nuances of 7.1.78. ashtadhyayi.com seems to prohibit नुम् for reduplicated main stems but not intensives. see √हु. It is possibly because the आतिदेशिकधातुः = जोहूय is no longer just a reduplicated stem. It is a different root already: 3.1.32 सनाद्यन्ता धातवः

@neeleshb : Please help clarify the above. बोभुवत् मामत् perhaps should decline like दधत् due to नाभ्यस्ताच्छतुः

@neeleshb
Copy link

नाभ्यस्ताच्छतुः is indeed applicable and बोभुवत् is the correct प्रथमा-एकवचनम्, the forms would be like ददत्. I will fix the website soon.

@yajnadevam
Copy link
Author

yajnadevam commented Feb 21, 2026

Thanks for the clarification @neeleshb and thanks for catching this @tbdasap

I have updated the code to incorporate 7.1.78 num blocking for reduplicated stems for sarvanāmasthāna.

@tbdasap here is pointing to the vocative, which should still be num agama

Can you clarify if vocative also should be blocked even though its not sarvanāmasthāna ? You have it for Voc. dadat https://ashtadhyayi.com/dhatu/03.0010?tab=krut&scroll=dhatuform-1030010-krut-शतृ&scrollcolor=cyan&scrolloffset=400

W.r.t Handle mat -> man vocative

The test case uses mA (adAdi) + yaNluk + Satf and expects mAman. Is there a shastric reference for this ? Curious about the motivation. It seems to violate the intent of नाभ्यस्ताच्छतुः

@yajnadevam
Copy link
Author

yajnadevam commented Feb 25, 2026

Updated here #226

Now, both nom and voc check for yaN or yaNluk and block num-agama

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

han + kvip derives hAn (should be han)

5 participants