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

Succinctly Describe Common Types of Matrices #340

Open
NV-Codes opened this issue Jan 21, 2025 · 3 comments
Open

Succinctly Describe Common Types of Matrices #340

NV-Codes opened this issue Jan 21, 2025 · 3 comments

Comments

@NV-Codes
Copy link
Contributor

MathCAT Version

MathCAT-0.6.8 RC 2 (NVDA Add-On)

Description

It would be helpful for MathCAT to recognize

  • identity matrices.
    • Example: "The four by four identity matrix"
  • zero matrices.
    • Example: "The three by one zero matrix"
  • diagonal matrices.
    • Example: "The two by two diagonal matrix, row 1 column 1, h-bar over two, row 2 column 2, negative h-bar over two"

The identity matrix is a special kind of diagonal matrix whose verbalization rule should override that of the general diagonal matrix.

It seems reasonably safe to employ these shorthand descriptions in all relevant cases in ClearSpeak and SimpleSpeak and to leave the current behavior in LiteralSpeak. Perhaps there are other considerations.

@NSoiffer
Copy link
Owner

I've thought about doing that for years (including back when I worked on MathPlayer). Thanks for adding this issue. It's a bit lower priority. I think xpath will allow me to recognize those cases (certainly the zero matrix), but I need to think about it.

Implementation maybe a couple of months away due to many high priority issues, including helping with pending translations, that I need to do first.

@NV-Codes
Copy link
Contributor Author

Sounds good!

@NSoiffer
Copy link
Owner

Just to save this somewhere, I think I can use the following patterns (not tested):

  • zero matrix (check first): not( */*/*[not(self::m:mn][.= 0)] )
  • identity matrix (check second): */*/*[self::m:mn][(.=1 and count(preceding-sibling::*)=count(../preceding-sibling::*)) or (.=0 and count(preceding-sibling::*)!=count(../preceding-sibling::*))]
  • symmetric matrix: */*/*[not(self.m.mn and . = 0)][ count(preceding-sibling::*)=count(../preceding-sibling::*) ]]

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