-
Notifications
You must be signed in to change notification settings - Fork 33
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
Handling @context
in Create Term Definition
#621
Comments
@context
in Create Term Definition #850@context
in Create Term Definition
BTW, you can see the rendered editor's draft on GitHub here.
I believe you're correct, and that it is the context of
The purpose of calling the Context Processing algorithm on the extracted
So, this would not be valid given the way the algorithms are intended to use scoped contexts. |
Thanks, I take your point about the scoping which I admit I don't fully understand. Can you comment on the issue of type checking though? How can we assign a |
The spec says that a term definition consists of several entries including an optional |
Thanks, in that case I will interpret the spec as meaning that "a term definition has a field called class TermDefinition:
context: dict[str, JSON]
# Other fields omitted My confusion is part of a greater issue about the ambiguity of the data type of context objects in the spec. In general when it says "local context" in means an unprocessed map, and when it says "active context" in means a processed context (what you call a context definition). However this is not consistent, as demonstrated by a term definition having a field called context which is an unprocessed map. I think this could be improved by:
I suppose this could be considered a separate issue to my original concern, so I'm happy to file it separately. |
I have some concerns about section 21 of 4.2 Create Term Definition algorithm:
It doesn't make sense to me for a few reasons:
@context
key is, at this stage, just a map. It doesn't become a context object until we execute the context processing algorithm on it. However, we throw away the result of this algorithm in 21.3 and instead just set the term definition's context tocontext
in 21.4, which is the "raw" unprocessed version. The same section as above specifies that the type ofcontext
for a Term Definition iscontext
, which to me means a processed context, the result of the context processing algorithm.Therefore I think the fix is to remove the "note" from this section, and instead assign
term_definition.context = create_term_definition(context, ...)
. Happy to put in a PR.The text was updated successfully, but these errors were encountered: