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

Add a UEB contractions exceptions list #223

Open
NSoiffer opened this issue Nov 14, 2023 · 0 comments
Open

Add a UEB contractions exceptions list #223

NSoiffer opened this issue Nov 14, 2023 · 0 comments

Comments

@NSoiffer
Copy link
Owner

NSoiffer commented Nov 14, 2023

There are other issues that suggest language-specific braille definitions.yaml file. This issue is about adding a
ContractionsOverride entry. This would be used to override what happens given the limited rules used by MathCAT. For example, "arccos" has rules for contracting "ar" and "cc". However, the "cc" shouldn't be used because "arccos" is a non-hyphenated compound word (RUEB 10.11.1). So "arccos" would be in the table.

ContractionsOverride: [
   "arccos" : ">ccos",
   "arccosine" : ">ccos9e",
 ]

Probably want to accept both Unicode braille and ASCII braille (as above).

The code would first check this list for standing alone words (hashmap in Rust), and then apply rules if not in the table.

In addition to "arccos", all the words in RUEB 10.1 and 10.2 should be in the list. Faster runtime and more flexible (can add "can't" etc., and not make the rule more complicated by checking for '.

NSoiffer added a commit that referenced this issue Nov 16, 2023
…to happen later in the string.

This means that some alternative braille output was generated. In one case (stat_9_7_2), the result is not a listed alternative, but it is reasonable and consistent with other listed results.

Added more contractions
Improved the code to make it easier to include contractions. The main downside is that some code runs on start up that was previously a `const`, but it shouldn't be much time and only runs if UEB is used.

Need to an exceptions list (#223) and then add back the `cc` contractions (commented out due to `arccos`).
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

No branches or pull requests

1 participant