-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[prakriya] Increase rule coverage to roughly 2100
Rule and test coverage: - Increase number of implemented rules from ~1900 to ~2074. These rules mainly add stronger support for samasas, svaras, and nama-dhatus. - Increase number of passing tests from 2169 to 2421. Design: - Add tentative support for recursive derivations by refactoring our args to use a more Paninian data model. This new argument structure supports a simple declarative API for deriving words. Our underlying implementation is largely the same, but this API allows us to move away from distinct derivational phases, which has implications for quality and performance. - As a first consequence of this API refactor, defer running the `tripadi` rules to the end of the derivation, as opposed to running them twice (once for the dhatu and once for the final output). Doing so fixes several major bugs (DIpsati, Ambibat) and makes significant progress toward fixing many more. Performance: - Improve performance by around 13%. This improvement comes mainly from upgrading `compact_str` to version 0.7.1, which uses branchless instructions. We also observed a smaller improvement from deferring `tripadi` rules and believe more improvements are possible if we optimize the `angasya` section. Approximate rule coverage, where "Tested" includes ignored tests: ``` +---------+------------+------------+------------+------------+ | Pada | Written | Tested | Missing | Total | +---------+------------+------------+------------+------------+ | 1.1 | 4 | 51 | 20 | 75 | | 1.2 | 0 | 30 | 43 | 73 | | 1.3 | 1 | 76 | 16 | 93 | | 1.4 | 14 | 33 | 63 | 110 | | 2.1 | 13 | 34 | 25 | 72 | | 2.2 | 4 | 4 | 30 | 38 | | 2.3 | 0 | 6 | 67 | 73 | | 2.4 | 5 | 29 | 51 | 85 | | 3.1 | 3 | 112 | 35 | 150 | | 3.2 | 12 | 130 | 46 | 188 | | 3.3 | 6 | 77 | 93 | 176 | | 3.4 | 2 | 40 | 75 | 117 | | 4.1 | 7 | 80 | 91 | 178 | | 4.2 | 7 | 65 | 73 | 145 | | 4.3 | 12 | 75 | 81 | 168 | | 4.4 | 3 | 106 | 35 | 144 | | 5.1 | 12 | 31 | 93 | 136 | | 5.2 | 5 | 60 | 75 | 140 | | 5.3 | 13 | 59 | 47 | 119 | | 5.4 | 12 | 51 | 97 | 160 | | 6.1 | 12 | 103 | 108 | 223 | | 6.2 | 2 | 6 | 191 | 199 | | 6.3 | 7 | 29 | 103 | 139 | | 6.4 | 14 | 124 | 37 | 175 | | 7.1 | 1 | 79 | 23 | 103 | | 7.2 | 4 | 95 | 19 | 118 | | 7.3 | 1 | 80 | 39 | 120 | | 7.4 | 4 | 77 | 16 | 97 | | 8.1 | 0 | 0 | 74 | 74 | | 8.2 | 7 | 55 | 46 | 108 | | 8.3 | 9 | 48 | 62 | 119 | | 8.4 | 2 | 31 | 35 | 68 | +---------+------------+------------+------------+------------+ | All | 198 | 1876 | 1909 | 3983 | +---------+------------+------------+------------+------------+ ```
- Loading branch information
Showing
130 changed files
with
9,005 additions
and
4,593 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.