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

In-built math implementations #4521

Closed
nvaccessAuto opened this issue Oct 3, 2014 · 17 comments
Closed

In-built math implementations #4521

nvaccessAuto opened this issue Oct 3, 2014 · 17 comments

Comments

@nvaccessAuto
Copy link

Reported by jteh on 2014-10-03 09:57
#4509 implements a pluggable framework for math. The built-in implementation for speech and interaction will be based on pyMathSpeak. pyMathSpeak didn't originally support interaction, but it creates a tree which is ideal for this purpose, so I'm enhancing it to support this.

Blocked by #4509

@nvaccessAuto
Copy link
Author

Comment 1 by jteh on 2014-10-03 09:57
Changes:
Milestone changed from None to next

@nvaccessAuto
Copy link
Author

Comment 2 by jteh on 2014-10-03 10:45
Branch: t4521
Try build
Crash course:

  • Move cursor to math, NVDA+alt+m to interact.
  • Hierarchical navigation: right/left arrows to move next/previous, down/up arrows to move in/out.
  • In a table, the usual control+alt+arrows to move between cells.

@nvaccessAuto
Copy link
Author

Comment 4 by peter on 2014-10-03 15:18
Hello,
testing on following page:
https://developer.mozilla.org/en-US/docs/Web/MathML/Examples/MathML_Pythagorean_Theorem
with this error:
ERROR - scriptHandler.executeScript (17:15:50):
error executing script: <bound method Gecko_ia2.script_moveByLine_forward of <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x056FCEB0>> with gesture u'down arrow'
Traceback (most recent call last):
File "scriptHandler.pyc", line 174, in executeScript
File "cursorManager.pyc", line 160, in script_moveByLine_forward
File "cursorManager.pyc", line 83, in caretMovementScriptHelper
File "speech.pyc", line 800, in speakTextInfo
File "speech.pyc", line 603, in speakTextInfo_addMath
File "mathPres__init
.pyc", line 77, in ensureInit
File "mathPres\pymathspeak.pyc", line 9, in
ImportError: No module named mathspeak.en

is it necessary to install something to test it?
Peter

@nvaccessAuto
Copy link
Author

Comment 5 by jteh on 2014-10-03 23:16
Arrrg. I messed up the build. Stand by.

@nvaccessAuto
Copy link
Author

Comment 6 by jteh on 2014-10-04 12:35
Here's a fixed try build.

@nvaccessAuto
Copy link
Author

Comment 7 by driemer.riemer@... on 2014-10-04 15:16
Hi,
Nice work. I had great success with the initial try build. Here is one error on mathjacks website.
http://www.mathjax.org/demos/mathml-samples/

ERROR - scriptHandler.executeScript (09:14:37):
error executing script: <bound method Gecko_ia2.script_moveByLine_forward of <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x05A48770>> with gesture u'down arrow'
Traceback (most recent call last):
File "scriptHandler.pyc", line 174, in executeScript
File "cursorManager.pyc", line 160, in script_moveByLine_forward
File "cursorManager.pyc", line 83, in _caretMovementScriptHelper
File "speech.pyc", line 722, in speakTextInfo
File "speech.pyc", line 607, in _speakTextInfo_addMath
File "mathPres\pymathspeak.pyc", line 100, in getSpeechForMathMl
File "mathspeak_core.pyc", line 1929, in translate
File "mathspeak_core.pyc", line 1992, in _endElementHandler
File "mathspeak_core.pyc", line 1892, in _translate_mover
File "mathspeak_core.pyc", line 1843, in _stackText
File "mathspeak_core.pyc", line 1072, in _isOperator
TypeError: _isOperator() takes exactly 2 arguments (1 given)

@nvaccessAuto
Copy link
Author

Comment 8 by jteh (in reply to comment 7) on 2014-10-04 16:02
Replying to driemer.riemer@…:

File "mathspeak_core.pyc", line 1072, in _isOperator

TypeError: _isOperator() takes exactly 2 arguments (1 given)

Thanks. Fixed, but I didn't update the submodule or build just for this.

@nvaccessAuto
Copy link
Author

Comment 9 by jteh on 2014-10-10 03:48
Broadening the scope of this ticket to cover integrating liblouisutdml for braille, which I've now done.
Changes:
Changed title from "In-built math speech and interaction via pyMathSpeak" to "In-built math implementations"

@nvaccessAuto
Copy link
Author

Comment 10 by ajirving on 2014-10-27 18:21
I tried to test this, but after checking out the branch, when I do
git submodule update
I get an error
No submodule mapping found in .gitmodules for path 'include/liblouisutdml'

Am I doing something wrong or has liblouisutdml not been added propperly?

@nvaccessAuto
Copy link
Author

Comment 12 by jteh on 2014-10-28 00:09
It's a new submodule, so you need to do:

git submodule update --init

@nvaccessAuto
Copy link
Author

Comment 13 by ajirving on 2014-10-28 13:43
Unfortunately that still gives the same error. I've checked the .gitmodules file and there isn't anything about liblouisutdml (the only change in this branch is the addition of pymathspeak).

@nvaccessAuto
Copy link
Author

Comment 14 by jteh on 2014-10-28 21:28
Hmm. My bad. Thanks for spotting. Not sure how I managed that.

Fixed in 764556f.

@nvaccessAuto
Copy link
Author

Comment 15 by ajirving on 2014-10-31 15:27
Thank you, it works now. This looks like being a really useful feature. Two small things though:

  1. The version of the pymathspeak module needs to be updated so that it includes your fix of _isOperator.
  2. If the braille translation is longer than the display then the display always seems to go to the end rather than the beginning (at least in Firefox).

@nvaccessAuto
Copy link
Author

Comment 16 by jteh (in reply to comment 15) on 2014-11-01 01:19
Thanks for your feedback!

Replying to ajirving:

  1. The version of the pymathspeak module needs to be updated so that it includes your fix of _isOperator.

Yeah. I figured I'd soon be making other changes to pyMathSpeak and didn't want too many submodule update commits, but I haven't worked on it in a while, so it's probably worth updating. I'm thinking of refactoring some of the changes I made, but that might be a while away.

  1. If the braille translation is longer than the display then the display always seems to go to the end rather than the beginning (at least in Firefox).

Yeah, I've noticed that. I think I understand why, but haven't thought of a way to fix it yet. :(

@nvaccessAuto
Copy link
Author

Comment 17 by jteh on 2015-05-01 12:04
Since MathPlayer is free (though regrettably not open source) and it surpasses the functionality here, we've decided to include support for MathPlayer and are not going to pursue this pyMathSpeak/liblouisutdml implementation.
Changes:
Added labels: wontfix
State: closed

@nvaccessAuto
Copy link
Author

Comment 18 by driemer.riemer@... on 2015-05-01 13:14
Would it be possible to include this in an addon? The fact that mathplayer does that jumping out of expresssions thingy is really getting on my nerve.

@nvaccessAuto
Copy link
Author

Comment 19 by jteh on 2015-05-01 13:28
I don't have time to work on putting this into an add-on, but it shouldn't be too hard if someone wants to try. The branch is still there.

Regarding auto zoom out in MathPlayer, it's very possible that this will be optional in a future beta of MathPlayer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants