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

Add a :structure (or :literal) property? #492

Closed
NSoiffer opened this issue Apr 16, 2024 · 15 comments
Closed

Add a :structure (or :literal) property? #492

NSoiffer opened this issue Apr 16, 2024 · 15 comments
Assignees
Labels
intent Issues involving the proposed "intent" attr need specification update Issues requiring specification changes

Comments

@NSoiffer
Copy link
Contributor

Some of us just finished a paper talking about intent. In it, we have several examples, including examples that say "... can be spoken as ... or as ...". In this case, we want no interpretation. E.g., $|x|$ should be spoken something like "vertical bar x vertical bar". That is, we want it to speak as "vertical bar x vertical bar can be spokens as absolute value of x or as determinant of x".

Without a property, this would have to be done using literals:

<math>
  <mo intent="_vertical-bar">|</mo>
  <mi>x</mi>
  <mo intent="_vertical-bar">|</mo>
</math>

This isn't horrible, but a property seems more elegant IMHO.

@davidcarlisle
Copy link
Collaborator

I thought we had added :structure to the core properties already, but apparently not.

The mathml example collection does have a :structure version of every example eg

https://w3c.github.io/mathml-docs/intent-examples/#id-2-871ed5ca252d8234d40d5a3cb7907740

which shows

<math intent=':structure' display='block'>
 <mrow>
  <mo>|</mo>
  <mi>x</mi>
  <mo>|</mo>
 </mrow>
</math>

read by MathCAT as vertical line x vertical line

@dginev
Copy link
Contributor

dginev commented Apr 16, 2024

This has been discussed on a couple of previous occasions, mostly related to "default modes": #433 (comment)

What I remember is that it partially overlaps "legacy mode", but explicitly prevents AT from making guesses, insisting on speaking the exact presentation structure/layout of an expression.

I think :literal is a bad fit for that, :layout seems better. But :structure is a good fit as well.

@dginev dginev added the intent Issues involving the proposed "intent" attr label Apr 16, 2024
@NSoiffer
Copy link
Contributor Author

It's embarrassing when someone else points out that I have already mentioned this and I had forgotten my own contribution :-)

We haven't discussed my suggestion in a while, but rereading it, I still agree with it. As it pertains to to this discussion, :structure along with how it should be handled/what it means still seems right to me.

Focusing on just the :structure description I gave (click on details in the link), are people generally ok with that part? Are there changes people would like to see?

If we get agreement, I can move it into the core properties list.

@davidcarlisle
Copy link
Collaborator

:structure looks good to me

@dginev
Copy link
Contributor

dginev commented Apr 16, 2024

To raise the concern early, structure has a formal use in universal algebra, which I could imagine leveraged in the Open terrain as:

<mi intent=":structure">𝒜</mi>

As one would have done with <span aria-description="structure">𝒜</span>. So we may want to qualify the "structure".

This appears slightly related to the discussion in #488 (comment) , which suggested :by-column or :column-wise as a hint to reading order. We may want to keep to a single naming convention and use :by-structure, or the fully qualified :read-by-structure?

@NSoiffer
Copy link
Contributor Author

Choice of a name is important, but common names should be short (it's a basic feature of words in languages, although obviously not true for all common words). If the worry is that :structure might be used as an open property, I would say the open property is the one that needs to be longer/more explicit.

@polx
Copy link

polx commented Apr 17, 2024

What about :typographic ?
(I would be good also with :verbatim)

@NSoiffer
Copy link
Contributor Author

I like :verbatim. In the paper, I chose the phrases "syntactic reading" and "semantic reading". So let me put :syntactic up for consideration. I'm not sure I'd vote for it though.

@davidcarlisle
Copy link
Collaborator

I don't like :verbatim at all, with my tex \begin{verbatim} hat on, that would make me think it would read

<mi>x</mi><mo>+</mo>...

as

less than em i greater than x less than ....

Of the ones suggested I prefer :structure . While it could have potentially other meanings, as @NSoiffer says above, if we are defining core properties we get to choose. So other open/contributed properties can choose a different name. The other core properties are similar: it's :function which could potentially have had any number of meanings but we define what it is, we don't call it :read-as-a-function-with-possible-of-connecting-word to ensure a unique name.

@dginev
Copy link
Contributor

dginev commented Apr 17, 2024

Right, :function encounters the same problem, that's a good point.

@davidcarlisle
Copy link
Collaborator

@dginev or to read the same data differently, function and silent and the other core properties show that this isn't a problem.

The core properties are (will be) defined in the spec, so by definition they will not clash with anything else. We should call it something that is vaguely representative of its use. calling it :wibble wouldn't help, but we do not have to worry about clashing with other uses.

@NSoiffer
Copy link
Contributor Author

NSoiffer commented May 1, 2024

Summary from 25 April meeting courtesy GPT4:

The meeting revolved around determining whether to add a structural property and what to name it. NS favored the inclusion of a property to avoid being overly literal. DG suggested naming it "by columns" or "verbatim," emphasizing clarity. PL preferred "by notation," while NS leaned towards "syntactic" or "tree" to maintain a less semantic focus. Discussions also touched on the default levels for speech interpretation and handling exceptional cases like square roots and primes. Overall, the group aimed for clarity without overthinking terminology, seeking a balance between structure and intent in mathematical expressions.

I like the final line that suggests, at least as far as AI is concerned, the WG is pragmatic and moderate in its discussions. :-)

@NSoiffer
Copy link
Contributor Author

NSoiffer commented May 8, 2024

The 2 May meeting decided to vote on a name and move on. The winner is "literal".

@davidcarlisle
Copy link
Collaborator

This property needs to be added to the list of core properties and the spec.

@davidcarlisle davidcarlisle added the need specification update Issues requiring specification changes label Sep 19, 2024
@davidcarlisle davidcarlisle changed the title Add a :struture (or :literal) property? Add a :structure (or :literal) property? Sep 19, 2024
@NSoiffer
Copy link
Contributor Author

Closing as text was added to the draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intent Issues involving the proposed "intent" attr need specification update Issues requiring specification changes
Projects
None yet
Development

No branches or pull requests

4 participants