-
Notifications
You must be signed in to change notification settings - Fork 18
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
Proposed intent with functional notation #451
Comments
in all the previous versions, the places where you end up with longish compound intents are places where you can't easily add mrows. eg something like this with and This may not be a great example as if decimal alignment worked you woudn't have to split the number, but you may want that for coloring or other reasons as you show in your mrow, but in a table row you can not group subterms.
|
I think
should be
with just one
|
Actually it looks like the example was intended to match It also seems as if only references can be used as arguments to functions? (I'm kinda lost) |
Corrected. |
I corrected another typo: And yes, I am proposing that, other than the first "names" entry of the namereflist, This forces there to be a nice structure on the markup, so you can refer by identifier. |
I would have expected
|
there does not appear to be any equivalent of eg
from list4 (assume |
I think namereflist is described correctly. I was trying to say:
(zeta function)
(zeta function,$bcd)
(zeta function,$x,$y)
I intended the example as:
<mi intent="named:function(Riemann zeta-function)">ζ</mi><mo>⁡</mo><mo>(</mo><mi>z</mi><mo>)</mo>
Not sure when I would want to put
intent="named:function(Riemann zeta-function,$x)"
The markup already says it is a function and what its argument is.
So only the name/pronunciation of the function is in doubt.
…On Fri, 17 Mar 2023, David Carlisle wrote:
namesreflist has ,not(` before the first ref, is that intentional?
intent="named:function(Bessel function of the first kind|Bessel-J, $x)"
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored thethread.[AABTULGUVRR46GOCSPF4WM3W4TQ4NA5CNFSM6AAAAAAV65YP66WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSX4KRXQ.gif
] Message ID: ***@***.***>
|
@davidfarmer Seriously? You deleted my comment? Please don't do that. |
you can not always put the function on the mo, for delimiters and other reasons, sometimes it has to be on the mrow, or as above, on mmultiscripts and so you need a functional form with arguments. when would you use
? |
Sorry! I also should not have changed my comment.
…On Fri, 17 Mar 2023, bruce miller wrote:
@davidfarmer Seriously? You deleted my comment? Please don't do that.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you werementioned.[AABTULHKXVHS3DCBK4U7QODW4TTIXA5CNFSM6AAAAAAV65YP66WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSX4LPIK.
gif] Message ID: ***@***.***>
|
I agree that there needs to be something that lets you specify
an infix or postfix reading.
…On Fri, 17 Mar 2023, David Carlisle wrote:
there does not appear to be any equivalent of @infix ?
eg
<mmultiscripts ***@***.***($n,$k)'>
<mi>C</mi>
<mi arg='k'>k</mi>
<mrow/>
<mprescripts/>
<mrow/>
<mi arg='n'>n</mi>
</mmultiscripts>
from list4
(assume choose is not in the known list)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored thethread.[AABTULGD7THEEP7DCQCIGOTW4TSOLA5CNFSM6AAAAAAV65YP66WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSX4LFV6.gif
] Message ID: ***@***.***>
|
currently you have
I suppose you could have
but it still looks very odd to me with |
Do you mean
intent='named:infix-function(choose)($n,$k)'
That seems reasonable.
…On Fri, 17 Mar 2023, David Carlisle wrote:
I agree that there needs to be something that lets you specify an infix or postfix reading.
currently you have
<mmultiscripts intent='named:function(choose,$n,$k)'>
I suppose you could have
<mmultiscripts intent='named:infix-function(choose,$n,$k)'>
but it still looks very odd to me with ,$n,$k rather than ($n,$k)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you werementioned.[AABTULA7XXDJCOLHQVNEAE3W4TU2BA5CNFSM6AAAAAAV65YP66WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSX4MDC6.
gif] Message ID: ***@***.***>
|
well I asked above if you intended to have |
an important feature of previous versions is that there is no syntactic difference between core and open concept lists, as the list of "known concepts" will in practice be variable. As far as I can tell you are using
for possibibly unknown intents. |
did you mean |
Yes, I meant named:X(foo). Edited to fix.
Just because I *intended* (choose,$n,$k) does not mean that
I am against (choose)($n,$k) . That second choice is perhaps
more natural because it sets out that ($n,$k) is the argument
of the function.
And I definitely missed the need for infix- and postfix- .
As to dropping the `value:` : I can see doing that. But without
the `category` , as in `function(foo)` or `number(foo)`
there is missing information which may make it hard for AT
to do the right thing in some cases.
|
well yes which is how we ended up with properties/hints in other variants, but largely dropped here (I think) |
In this proposal, does the inverted "median of x at index i" example (TeX <msub intent="median(index($x,$i))">
<mover accent="true">
<mi arg="x">x</mi>
<mo>¯</mo>
</mover>
<mi arg="i">i</mi>
</msub> end up identical? And if the concepts weren't known, would it instead be the same structure but with intent:
or would these be named functions?
|
@dginev if I understand the proposal you could not do |
There are several things going on in @dginev 's example.
But more likely we will encounter other situations where the preferred
I also realize that I unfortunately did not allow
In this discussion it does not seem to matter that the "sub i" |
that is surely the point of Deyan's example? It is not the "mean of
That is, you want to read it as the logical markup
without forcing that layout. |
In general, nested function calls and/or literal values are used in the previous proposals to handle cases where the mathematical structure does not match the presentation mathml element structure. It is hard to see how you can handle these cases while restricting function arguments to You give an easy example re-constituting a coloured number where there is a containing
|
As also discussed in #448 , we have to decide if intent is supposed to go In the "my-median of x sub i" example, the markup clearly indicates The intent should clarify, such as indicating to pronounce it "my-median" For the example of
The fact that the intent on |
I think as the chief current trouble-maker I should clarify that the people who tend to ask for trouble don't go away, but find the trouble elsewhere. Which is fine really, as long as everyone expects that it will inevitably happen :) Deciding that cases where "presentation and intent structures do not align" are out of scope for this syntax proposal is a reasonable outcome. But then you get the inevitable follow-up, where someone who is decided on using that presentation MathML will use the more restrictive syntax to achieve that as either a parallel tree, or a single tree with extra wrapping mrows:
<mrow intent="$intent-branch">
<mover accent="true">
<msub>
<mi>x</mi>
<mi>i</mi>
</msub>
<mo>¯</mo>
</mover>
<mrow arg="intent-branch" intent="median($indexed-arg)">
<mrow arg="indexed-arg" intent="index(x,i)"/>
</mrow>
</mrow>
<mrow intent="median($indexed-arg)">
<mrow intent="index($x,$i)" arg="indexed-arg">
<msub>
<mover accent="true">
<mi arg="x">x</mi>
<mo>¯</mo>
</mover>
<mi arg="i">i</mi>
</msub>
</mrow>
</mrow> My main point being that a restricted syntax will mostly make it more awkward to "ask for trouble", but will not eliminate the possibility (as long as Presentation MathML remains as flexible as it currently is). |
No, sorry I do not see it that way at all. If you start from a "semantic" tex markup such as Note this happens all the time. If you have then need and again, you need nested function calls as neither foo nor power have an element that corresponds to an argument. |
If by "markup" you mean the pure MathML without the intent, then: No, the markup indicates "(x with overbar) subscript i".
Exactly; and they do. Knowing the hypothetical (but common) context, they would recognize that overbar stands for median, and that whatever kind of collection "x" is (vector, array, list, whatever) don't have medians, but the elements of those collections do have medians, the sighted reader would figure out that the expression must mean "median(index(x,i))", and that "index(median(x),i)" would be wrong.
Hmm. I thought that was exactly what it was for. To me, notation ambiguity is just a form of inaccessibility. Both sighted and non-sighted people are just as capable of figuring out that overbar stands for median, that "J" stands for Bessel, etc. But without the visual cues and context, it is much harder for the latter to do, unfairly so. Is that the wrong perspective? |
When I said "I don't see that intent is there to remediate inaccessible
markup" I was referring to decimal numbers spanning multiple cells
in a table. That is inaccessible to a level beyond ambiguous notation.
I accept that in the "my-median of x sub i" example, the presentation
markup actually says "(x overbar) sub i". I don't see that as
inaccessible markup.
Things like |x| require intent, because the literal reading,
pronouncing all the symbols, imposes a cognitive burden. And AT guessing
the wrong meaning is worse.
Is it better to hear "mean of quantity x sub i endquantity", which is what
it means but not what the markup literally indicates? Or would the AT
user prefer just hearing "mean" instead of "overbar" with the existing
markup?
|
The markup is not something the reader should be aware of at all, it is just a technical necessity. I think I do not see how you can specify an intent for |
I am hoping that this functional approach is workable, and I understand
that if intent goes outside the presentation tree, then nested arguments
are necessary.
|
I'm not sure what you mean by "outside" here but in any case I'd see specifying intents for |
Most of the above discussion was about arguments to functions, so some comments on the other parts of the proposal, with comparisons to https://w3c.github.io/mathml/#mixing_intent_grammar
I think listing names in the grammar is too fragile, better to accept any identifier here, with the system
As noted above, I can't see any way to make a restriction to
As discussed above
Probably should be
This
I can't say I like the names
as for
If you make category/property an open list this just becomes a special case of the previous clause but with an interpretation that property |
There is a lot for me to unpack here. I will working on modifying the grammar, |
I'm having a hard time getting an overview perspective of this proposal; Can you give a sense of the advantages of this proposal over the others? |
Perhaps it isn't if you can get the same effect.
Without modifying the MathML, how should an annotator that knows the meaning is "the mean of the i-th element of x" encode the |
I hope this is at least a partial answer to the question of what I am thinking about the interface I am creating which will convert For core intents, I am not particularly concerned: those will have a The hard part is how I will enable authors to indicate special treatment My other conclusion was that, as I figure out how I will allow authors For example, a particular symbol may represent a function in one There also is the issue of what authors want to indicate, even if we The previous paragraph describes things like specifying that the content of an Another issue is numbers. I don't like the idea of requiring "." as the decimal I'd like to be able to output those types of intent. And unless |
Actually I'd say a main effect of the proposal here is that it offers arbitrary speech strings for people who don't like I must admit I assumed that was the main motivation, as it's the main new feature.
seems valid (you could replace
without the ugly |
I don't think the problems came from allowing arbitrary text for the
name of a function. After all, "Bessel function of the first kind"
is the name of the function commonly denoted "J". But nobody says
that when pronouncing a formula. They say things like "Jay naught",
which is bad because it hides the fact that the 0 is in a subscript.
AT would indicate the subscript (I assume).
The `named:function` part of the markup makes a difference.
It is possible that I have not absorbed what is going on with the
underscores.
…On Wed, 22 Mar 2023, David Carlisle wrote:
I'd like to be able to output those types of intent. And unless
someone can figure out a way to only allow speech strings that make things better,
I'd like to disallow those.
Actually I'd say a main effect of the proposal here is that it offers arbitrary speech strings for people who don't like _ .
I must admit I assumed that was the main motivation, as it's the main new feature.
intent="named:function(arbitrary English sentence here)"
seems valid (you could replace named with adhoc etc but as far as I can tell all allow the equivalent of
_(_arbitrary, _English, _sentence, _here)
without the ugly _
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you werementioned.[AABTULFY7DE6N32HKUBHGVLW5OCBTA5CNFSM6AAAAAAV65YP66WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSYHS6LG.
gif] Message ID: ***@***.***>
|
ok so my example should have been that this proposal makes it easy to have
use
is to ignore the mathml markup completely and generate the speech string |
For the record I hold the opposite design bias: Unless AT can generally guarantee great coverage of all edge cases we can expect to encounter in a broad sample of real-world uses of math syntax, I would like the authors to always have an "escape hatch" where they can remediate linguistic realities that were not foreseen during the WG's limited charter and survey scope. |
I agree that what I am asking for would allow
`intent="named:function(Jay naught)"` on the `msub`.
My thoughts are slowly (maybe too slowly) turning toward wanting to
be able to do what I think would be useful, and away from trying
to prevent others from doing what would not be helpful.
…On Wed, 22 Mar 2023, David Carlisle wrote:
ok so my example should have been that this proposal makes it easy to have
<msub intent="named:function(Jay naught)"><mi>J</mi><mn>0</mn></msub>
The named:function part of the markup makes a difference.
use adhoc:operation in my examples if you prefer. Unless I misunderstand you completely, the effect of
intent="adhoc:operation(an english sentence)"
is to ignore the mathml markup completely and generate the speech string an english sentence
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you werementioned.[AABTULBXJB5IGMOB2FNT5ATW5OFWNA5CNFSM6AAAAAAV65YP66WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSYHUH2U.
gif] Message ID: ***@***.***>
|
apart from making it easier to supply space separated words (and |
you ask
I think the answer is yes as you give the example
but that doesn't parse. To parse 3.14 as a number in the grammar above you would need something like
but even this is a bit confusing as it looks like a type ":" category but is in fact a separate grammatical form with separate parse rules for the argument. I think it would be clearer if we want a separate grammatical form for numbers allowing comma to use a separate syntax, say |
I think we were too hasty in our discussion of numbers.
It is not just a question of commas or periods.
What is a "number"? Complex numbers? Scientific notation?
A wrapper for numbers, either `number(***)` or `[***]` is worth
discussing. As is the possibility of push-back if we do not allow comas.
…On Thu, 23 Mar 2023, David Carlisle wrote:
you ask
The "number" intent (is it too confusing to have it as both an intent and a category?)
I think the answer is yes as you give the example
<mrow intent="number(3.14)">
but that doesn't parse. number there is a knownintent so does not allow digits.
To parse 3.14 as a number in the grammar above you would need something like
<mrow intent="value:number(3.14)">
but even this is a bit confusing as it looks like a type ":" category but is in fact a separate grammatical form with separate
parse rules for the argument.
I think it would be clearer if we want a separate grammatical form for numbers allowing comma to use a separate syntax, say [3,14]
so you could use that anywhere as foo-bar($x,[3,14]) but the feeling on last week's call was not to allow decimal comma in the
syntax, which means quoting is not needed and foo-bar($x,3.14) works.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you werementioned.[AABTULARW6TVUWDMBKI3F2DW5QZKHA5CNFSM6AAAAAAV65YP66WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSYI3QJE.
gif] Message ID: ***@***.***>
|
yes I wondered about that too. Certainly here (documenting a numerical sofware library)
if we were discussing text strings I think there would be push back but I know of no system using comma separated function arguments that allows decimal comma. That said, some quoting method or using spaces for agument separation both work. |
The current grammar would treat Comma remains a problem: |
@brucemiller yes at https://mathml-refresh.github.io/intent-lists/intent4.html#IDdecimalcomma I have |
Both @physikerwelt and @polx were pretty clear last week that allowing two different forms of a "decimal separator" has turned out to be a bad idea in practice. I was worried about imposing my cultural bias on others, but it seems that everyone has accepted the "." in practice and not only are ok with it, but strongly want it to stay that way to keep numbers simpler. Note: this is about intent values, not the actual display value. |
To be replaced by a new issue listing a few of the desirable features which maybe |
Proposal for a functional grammar for intent
This seems workable on the examples we have discussed, with proper
markup (meaning judicious use of mrows) and recognizing that
micromanaging the pronunciation often makes things worse.
Challenging cases welcome, of course! In particular, examples that
were headless or leading underscore under other proposals.
{comments in curly brackets}
Example of knownintent
<mrow intent="absolute-value($x)"><mo>(</mo><mi arg="x">A</mi><mo>)<mo></mrow>
Example of isa
<mrow intent="isa:system-of-equations">ABC</mrow>
tells AT that ABC is a system of equations.Similarly for
isa:matrix
andisa:cases
.Things like
isa:operation
orisa:group
probably have no effect initially.Examples of named
<mi intent="named:extension(free algebra)">R</mi>
<mi intent="named:function(Bessel function of the first kind|Bessel-J)">J</mi>
The "named" type is used to indicate that the item has an existing name.
The "|" separate different names, with the more verbose coming first.
(We can consider omitting the option to have multiple names.)
The "named" type tells AT that it can use the literal value if desired.
Examples of adhoc
<mo intent='adhoc:operation(foo)'>⊞</mo>
(that symbol is a plus in a box)
The "adhoc" type is used to indicate that the author is making up the name,
or that the name is nonstandard. There should not be "|" alternatives for
an adhoc name.
The "adhoc" type tells AT that it can use the literal value if desired.
Examples of value
<mo intent='value:operation(times)'>*</mo>
The "value" type is used to indicate that AT should use that value
instead of the literal content. There should not be "|" alternatives for
a value name. (value is implict for knownintent)
Some special cases
The "superscript" core intent is used to have the correct pronunciation
for things like
<msup><mi>H</mi><mn intent="superscript">2</mn></msup>
While it is true that (in the context of (co)homology) a person
would pronounce
H^2
as "H 2", they also would pronounceH_2
the same way.The
superscript
intent tells AT that the2
is just a superscript/index, not a power,so it will probably say "H sup 2", which is better.
The "number" intent (is it too confusing to have it as both an intent
and a category?) covers cases which were mentioned on a call, such as:
<mrow intent="number(3.14)"><mn color="red">3</mn><mo>.</mo><mn color="blue">14</mn></mrow>
In this, and many examples, it is necessary to have suitable
mrow
sin order to fit the proposed intent grammar. (This allows keeping numbers
out of the arguments of intent, except inside the
number
intent ornumber
category.)Some special features
In many cases, at least with the initial implementations, the "category"
is ignored and
intent="named:X(foo)"
is probably pronounced "foo", no matter the category X.In some cases the "category" can be a useful signal to AT.
For example, if the category is "function" then AT can know to say "of"
before the reference.
Otherwise, the AT just says the name and the references in order.
The text was updated successfully, but these errors were encountered: