I'm creating a task on AMT using the Crowd entity annotation Elements that let reviewers label each word in a text block.
I want to ensure that the reviewer selects a label for every word/character in the text before submitting the job. What I am trying is to use onsubmit
and a validation function in the script section to check whether the length of the labeled entities added together is equal to the total length of the text block but I can't access the output of the crowd entity annotation. This is what I tried but failed:
const answers = document.querySelector('crowd-entity-annotation').value.entities
I also tried this, which return 'undefined':
const answers = document.querySelector('crowd-entity-annotation').entities
I appreciate any help.