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

UEB: Incorrect usage of passage mode #213

Closed
rob-aph opened this issue Nov 7, 2023 · 4 comments
Closed

UEB: Incorrect usage of passage mode #213

rob-aph opened this issue Nov 7, 2023 · 4 comments

Comments

@rob-aph
Copy link
Contributor

rob-aph commented Nov 7, 2023

I have the following:

<math>
    <mn>9</mn>
    <mo>+</mo>
    <mn>4</mn>
    <mo>=</mo>
    <mo>?</mo>
</math>

Computed braille string:
⠰⠰⠰⠼⠊⠐⠖⠼⠙⠀⠐⠶⠀⠦⠰⠄

I tried fixing this myself, but no clude why passage mode is used here. If I use a variable instead of a question mark, it works as expected, using a single grade 1 indicator for the variable.

@NSoiffer
Copy link
Owner

NSoiffer commented Nov 7, 2023

Looking at it, there is definitely a bug in the code that says whether G1 Word mode is needed. A BANA rule about 2 or more whitespace chars triggers the passage mode.

There is a very similar example in GTM in section 3.6. For some reason, I skipped over adding tests from that section, so I'll add the examples from there to the tests and hopefully eliminate this bug and maybe some other bugs.

@NSoiffer
Copy link
Owner

This took a while to hopefully get right. After adding all the omission examples and redoing the code, there is now one test failure, but I think the MathCAT choice is better than the ICEB one...

In GTM, 9.7 (Statistical Functions), the second example is "Exp(R) = n/2 + 1" (where the division is a 2D fraction). GTM says the braille should be

⠰⠰⠰⠠⠑⠭⠏⠐⠣⠠⠗⠐⠜⠀⠐⠶⠀⠷⠝⠨⠌⠼⠃⠾⠐⠖⠼⠁⠰⠄

and MathCAT now finds

⠠⠑⠭⠏⠐⠣⠠⠗⠐⠜⠀⠐⠶⠀⠰⠰⠷⠝⠨⠌⠼⠃⠾⠐⠖⠼⠁

This is shorter and is consistent with two other examples (omission_3_6_7 and fraction_6_4_6) that use a word indicator later in the output.

@rob-aph: do concur that is better output, or at least on par with what GTM uses?

@rob-aph
Copy link
Contributor Author

rob-aph commented Nov 16, 2023

I believe the GTM braille for 9.7 is correct, because the R in parentheses could be interpreted as "Rather."

@NSoiffer
Copy link
Owner

When I implement #223, that would tell me the test result is MathCAT came up with is bad. You've given me early warning...

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

2 participants