[Inception 34.5] : Constraints between 2 span layers

6 views
Skip to first unread message

PIERRE CHIRON

unread,
May 3, 2025, 12:57:34 PM5/3/25
to inception-users

Hello,

I have a question regarding the writing of "Constraints" rules.

I have two annotation layers: Thematiques and Revendications. Regarding the features of these two layers:

  • Thematiques { Thematique { type: Primitive String, options: [Enabled, curatable], visibility: show in labels, tagset: thematiques }}
  • Revendications { revendicationgj { type: Primitive String, options: [Enabled, curatable], visibility: show in labels, tagset: revendications }}

I have a corpus composed of political texts. The annotator will first annotate the theme of a text segment. Then, they will select the "Revendications" layer to annotate a claim. The claim will depend on the theme. In other words, if the annotator selects the theme "Economie et fiscalité," I would like some tags of the "revendicationgj" feature from the "Revendications" layer linked to the thematic "Economie et fiscalité" to be displayed or highlighted in bold.

In the rules, I followed the recommendations prescribed in the documentation. I imported the two layers and followed the syntax. Here is the code below:

import webanno.custom.revendicationgj as revendicationgj;
import webanno.custom.Thematiques as Thematiques;

Revendications {
    @Thematiques.Thematique = "Economie et fiscalité" -> revendicationgj = "Impôt sur le revenu davantage progressif (plus de tranches)." |
    revendicationgj = "Pas de prélèvement à la source." |
    revendicationgj = "Taxation des grandes entreprises (Macdo, Google, Amazon, Carrefour...)." |
    revendicationgj = "Fin de la hausse des taxes sur le carburant." |
    revendicationgj = "Taxe sur le fuel maritime." |
    revendicationgj = "Taxe sur le kérosène.";
}

This piece of code does not work. Regardless of the annotated theme, my entire list of labels is displayed. I have tried various options such as "Show only when constraints apply," but my feature no longer displays. Did I miss something? Should I define the type as linked to the Thematiques layer? I am not yet very familiar with the definitions of the various features of Inception.

Thank you in advance for your help.


Richard Eckart de Castilho

unread,
May 4, 2025, 2:46:59 PM5/4/25
to incepti...@googlegroups.com
Hi Pierre,

I assume this issue is from you. I have answered there.

https://github.com/inception-project/inception/issues/5415

Cheers,

-- Richard

Reply all
Reply to author
Forward
0 new messages