Speech-Rule-Engine / speech-rule-engine

Generating speech descriptions for XML structures
https://zorkow.github.io/speech-rule-engine/
Apache License 2.0
75 stars 39 forks source link

feature: enriched output with both speech and braille #439

Open pkra opened 3 years ago

pkra commented 3 years ago

In https://github.com/zorkow/speech-rule-engine/issues/438#issuecomment-727638329 I had asked how to "merge" speech and braille output.

As per discussion with @zorkow, while this approach should work for now there might be problems in the long run, e.g., when heuristics are configured differently for each format.

The long-term solution would be for SRE to provide an additional option to create enriched output containing multiple formats.

pkra commented 3 years ago

As per F2F, there shouldn't really be a problem as long as speech and braille are generated with the same heuristic setup (which is currently not directly confgurable anyway).

I would still be nice to have a convenient function as part of SRE to get both with a single API call.

pkra commented 3 years ago

As per F2F, there shouldn't really be a problem as long as speech and braille are generated with the same heuristic setup (which is currently not directly confgurable anyway).

I would still be nice to have a convenient function as part of SRE to get both with a single API call.

Just to record this here, too. I've found a simple example where this is no longer the case. Something like (1\;2) will lead to incompatible tree structures since the braille heuristic for cycles kicks in and ignores the space whereas the speech heuristics makes the space a times; in particular the space gets a semantic-id in speech but not braille, messing up mapping the two trees afterwards.

pkra commented 2 years ago

I don't know if this should be filed as a separate issue but using my hacky way of combining trees I found an example where I have no braille but a speech label, e.g., \prod _{j\geq 1}(1-x^j)^{-1}, on the leaf of \prod.