Skip to content

updating format of yaml for concept lists - #97

Draft
davidcarlisle wants to merge 33 commits into
w3c:mainfrom
davidcarlisle:main
Draft

updating format of yaml for concept lists#97
davidcarlisle wants to merge 33 commits into
w3c:mainfrom
davidcarlisle:main

Conversation

@davidcarlisle

@davidcarlisle davidcarlisle commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

This is a draft PR to make sure it doesn't accidentally get merged before discussion, however the updated yaml and index files do work and can be viewed at

core: https://davidcarlisle.github.io/mathml-docs/intent-core-concepts/

open: https://davidcarlisle.github.io/mathml-docs/intent-open-concepts/

The diff here isn't very informative as the indentation of the yaml necessarily changed so the diff basically just reports the entire file changed, I'll try to list the main changes here

General Plan:

Move the core and open yaml files to be subsets of the same common yaml format, that is matching the same structure but some fields may not be used in one or other file. With the general structure hopefully close to the format discussed in relation to @dginev 's demos of an editor for the open list.

Core

As before, this has two top level dictionaries defaultfixity and concepts however the concepts dictionary is no longer subdivided into sections based on subject area, it is now a single collection of concept entries, but each concept has a subject-area entry that allows the HTML display to reconstruct the headings.

The language templates under en:, de: etc are moved down a level under a speech: entry

The arity entry is (almost) now redundant and replaced by a list of argument names.
Currently the names are just a1, a2, ... for ease of translation but that is not assumed individual entries could use more meaningful names (but see notes below)

so a typical entry is:

  - concept: closed-open-interval
    subject-area: functions and inverses
    arity: 2
    arguments: [a1,a2]
    property: function
    speech:
      en: interval between a1 (included) and a2
      fr: intervalle ouvert à droite entre a1 et a2

Open

The format is as for core except that there is no defaultfixity dictionary.

The one existing section "open concepts" has been removed so as for core, the concepts dictionary is now at the top level.

The existing area field was renamed to subject-area and the HTML display sorts the entries based on this field.

$1, $2, ... changed to a1, a2, ... as for core.

Notes

Most arities use a fixed number and for example arity: 2 is redundant given arguments: [a1, a2] however some had variable arity such as >=0 and >=1 and it isn't clear how that can be shown on the argument list, currently

    arity: ">=0"
    arguments: [a1,...]

    arity: ">=1"
    arguments: [a1,...]

    arity: ">=2"
    arguments: [a1,a2,...]

I could use [...] for the >=0 case, but then there isn't a name to use in the speech templates unless we predefine one?

The speech templates used to use $1 and $2 etc to denote where the argument should be used in the expression, the current draft uses the names from the argument list. while they are a1, a2 they are distinguishable from natural language but if more natural argument names were used this might not be the case, eg

  - concept: open-interval
    subject-area: functions and inverses
    arity: 2
    arguments: [lower,upper]
    property: function
    speech:
      en: open interval between lower and upper

does perhaps not make it easy to distinguish the "slots` perhaps they should be explicitly marked

      en: open interval between {lower} and {upper}
      en: open interval between <lower> and <upper>
      en: open interval between $lower and $upper

or some such? I updated to use the $ prefix in the current draft

the markup for conditional expressions is a bit unsatisfactory
currently conditional based on the input marked as follows (does not occur in the open list)

    conditions:
      - condition: "a2=2"
        speech:
          en: "a1 squared"
          fr: "a1 carré"
      - condition: "a2=3"
        speech:
          en: "a1 cubed"
          fr: "a1 cube"
      - condition: ""
        speech:
          en: "a1 to the a2<i>th</i> power"
          fr: "a1 à la a2"

Conditional based on user settings is marked as

    speech:
      en:
        - "(verbose) the a3 derivative of a1 with respect to a2"
        - "(terse) d <a3 if a3 != 1> a1 by d a2 <a3 if a3 != 1>"

Extra fields in Open, currently there are several fields in the open list not used in core these could be used in core later but first we should fix the exact list, I think there is a lot of flexibility here, to fit in with whatever works best for the proposed editor.

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

Successfully merging this pull request may close these issues.

1 participant