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

Inverse context creation algorithm: could steps 3.16) and 3.17) be merged? #633

Open
ghost opened this issue Feb 4, 2025 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Feb 4, 2025

Hello,

In the inverse context creation algorithm (4.3.2), steps 3.16) and 3.17) look suspiciously similar. Could they be merged? For instance:

3.16.1) Create new variable default-lang-dir.
3.16.2) If active context has a default base direction, set default-lang-dir to the concatenation of default-language and default base direction, separated by '_'.
3.16.3) Otherwise, set default-lang-dir to default-language.
3.16.4) If language map does not have a default-lang-dir entry, create one and set its value to the term being processed.
3.16.5) (verbatim old 3.16.3)
3.16.6) (verbatim old 3.16.4)

Remove 3.17).

What do you think?

Best regards,

Vivien

@pchampin
Copy link
Contributor

Hi Vivien,

that's a good point. In fact, we could even move part of this between steps 2 and 3. It is a bit strange to handle the active context's default language at the top, and the default base direction at the bottom...

pchampin added a commit that referenced this issue Feb 27, 2025
This reorders and factorizes some parts of the 'Inverse Content Creation' algorithm.
It does not change the behaviour of the algorithm,
except for one corner case:
if the active context has no default language but has a default base direction,
the default combined tag is now _{dir}.
In the previous version, it was @none_{dir}.
I find this more consistent with steps 3.13.4 and 3.15.1,
and I suspect that this former discrepency was actually a bug.
pchampin added a commit that referenced this issue Feb 28, 2025
and using the markup for candidate corrections
@gkellogg gkellogg moved this to Future Work in JSON-LD Management Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Future Work
Development

No branches or pull requests

2 participants