Closed dungscout96 closed 1 year ago
I don't think nested definitions are the answer because of all the other problems they can cause.
In some later version, we might want to consider definition groups, but would restrict this to one level. Specifying relationships among defined quantities (for example for task and event relationship specification) might be an application of this.
He can put multiple Def
's in the same Onset
group. I think:
(Def/Number-image, Def/Number_category_task, Onset)
is allowed, but:
(Def/number-image, (Def/Number_category_task), Onset)
is better because it more clearly identifies the anchor for the Onset
.
Actually, going over the specification in more detail:
(Def/Number-image, Def/Number_category_task, Onset)
is NOT allowed, but:
(Def/number-image, (Def/Number_category_task), Onset)
Thus, multiple definitions can be used together, but only one can be the anchor for the Onset
.
@dungscout96: Does this resolve the discussion?
The issue here is not using two (or more) definitions in the same Onset tag group but in using one within the other. In the user's example: (Definition/Number-image, (Visual-presentation, (Foreground-view, (White, Def/Number), ...) (Definition/Number, (Item, Quantitative-value, Description/A three-digit number.))
Def/Number is used inside the definition of "Number-image".
I think if this is still not supportable we can close this issue for now. The current motivation is for tagging shortcut. The square bracket mechanism (to parameterize tag value based on values in a column) is probably more important to implement/discuss.
This nesting would require that the two definitions always be available together as well as an issue of cycle detection. It would require a significant change in infrastructure.
On Mon, Jan 23, 2023 at 12:25 AM Dung Truong @.***> wrote:
The issue here is not using two (or more) definitions in the same Onset tag group but in using one within the other. In the user's example: (Definition/Number-image, (Visual-presentation, (Foreground-view, (White, Def/Number), ...) (Definition/Number, (Item, Quantitative-value, Description/A three-digit number.))
Def/Number is used inside the definition of "Number-image".
I think if this is still not supportable we can close this issue for now. The current motivation is for tagging shortcut. The square bracket mechanism (to parameterize tag value based on values in a column) is probably more important to implement/discuss.
— Reply to this email directly, view it on GitHub https://github.com/hed-standard/hed-specification/issues/439#issuecomment-1399872756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJCJOSBSPJDVQDIMPC6E23WTYP6ZANCNFSM5W32M6OQ . You are receiving this because you commented.Message ID: @.***>
Closing this issue.
This issue could be reopened in the future and revisited if a use case arose that could not be solved in another way.
I received email from a user (his example annotation attaced): "I am using def inside a Definition as shown in the attached doc. The idea is the following: First I define the event of showing a three-digit number (show_number). Inside that, I define the event of a screen with a number in the centre (Number-image). And inside the former, I define what a number is (Number).
When validating that on CTagger, I receive the following error: ERROR: Invalid tag Def/Number found in definition for Number-image. Def and Def-expand tags cannot be in definitions.
The question is, should I simply drop the Def inside the Definition? Or is there any way in which this functionality is incorporated in CTagger? I am using similar definitions for more complex scenarios where the definition inside a definition would facilitate the interpretability of the tags (e.g. the event is show_categories, where left and right arrows are shown with an A and B above them respectively. I use def inside a definition to explain what a left arrow and a right arrow are, as well as a letter A and B)."
HED_Def_Inside_Definition.docx
My straightforward answer to him would be nested definitions are not allowed and he would have to write out the tags explicitly. However I want to bring this to our general attention since this is an example where the need for nested definitions might be valid. I understand that this might be infeasible to implement, at least right now.
He needs to use Def/Number-image in the main tag string because it's associated with an Onset. The Def/Number is used in a very specific location in Definition/Number-image and I can imagine for complex, hierarchical stimuli other users might also find the nested definitions approach logical and natural.