Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

अक्ष्णोति should use रषाभ्यां नो णः समानपदे #123

Closed
neeleshb opened this issue May 22, 2024 · 3 comments · Fixed by #124
Labels
good first issue Good for newcomers vyakarana Requires deeper knowledge of Sanskrit grammar

Comments

@neeleshb
Copy link

The derivation of अक्ष्णोति (अक्ष् 1.0742, लट् प्र.पु.ए.व ) uses अट्कुप्... to convert न् to ण्. Technically it should use रषाभ्यां as न् is immediately after ष्

@neeleshb
Copy link
Author

Looks like same issue for a few other places, E.g. पुष्णाति.

@akprasad
Copy link
Contributor

@vipranarayan14 this should also be a good first issue if you want to try fixing it. You can navigate the codebase by grepping for specific rules, e.g. "8.4.1"

@akprasad akprasad added good first issue Good for newcomers vyakarana Requires deeper knowledge of Sanskrit grammar labels May 22, 2024
@akprasad
Copy link
Contributor

@vipranarayan14 has identified that the issue is in pada_8_4.rs, specifically this block:

// 8.4.1 states *samAna-pade*, which means that the span must not cross a pada.

My notes are that it's specifically this line within the block:

p.run("8.4.2", |p| p.set_char_at(i_n, "R"));

Here we apply only 8.4.2. Instead, we should use logic like this:

if the r/s and n are right next to each other {
  p.run("8.4.1", |p| p.set_char_at(i_n, "R"));
} else {
  p.run("8.4.2", |p| p.set_char_at(i_n, "R"));
}

We can evaluate the first condition by comparing i_rs (the index of r/s in the string) and i_n (the index of n in the string).

We can then confirm that this fix is correct by adding a test case to tests/prakriyas.rs to confirm that the prakriya for e.g. अक्ष्णोति uses 8.4.1 and that the prakriya for some other word uses 8.4.2 instead.

vipranarayan14 added a commit to vipranarayan14/vidyut that referenced this issue May 26, 2024
With this fix, we correctly apply 8.4.1 for the derivation
of `akzRnoti` (`akzU~`) and others.

Fixes ambuda-org#123.
akprasad pushed a commit that referenced this issue May 26, 2024
With this fix, we correctly apply 8.4.1 for the derivation of `akzRnoti`
(`akzU~`) and others.

Fixes #123.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers vyakarana Requires deeper knowledge of Sanskrit grammar
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants