- Newest
- Most votes
- Most comments
Hello,
I understand that you are trying to use the ‘initial-value’ parameter of Named Entity Recognition project in Ground Truth and In this context i would like to tell you that the ‘initial-value’ array which you were trying to add in the manifest file needs to be added in the HTML UI file that you have created for the human workers to label the tasks.
Below is the code that i tried replicating at my end and when i added the ‘initial-value’ array inside the <crowd-entity-annotation> script it worked.
<script src="https://assets.crowd.aws/crowd-html-elements.js"></script>
<crowd-entity-annotation
name="crowd-entity-annotation"
header="Highlight parts of the text below"
labels="[{'label': 'person', 'shortDisplayName': 'per', 'fullDisplayName': 'Person'}, {'label': 'date', 'shortDisplayName': 'dat', 'fullDisplayName': 'Date'}, {'label': 'company', 'shortDisplayName': 'com', 'fullDisplayName': 'Company'}]"
text="Amazon SageMaker Ground Truth helps you build highly accurate training datasets for machine learning quickly."
initial-value="[
{
label: 'person',
startOffset: 0,
endOffset: 16
}
]"
>
<full-instructions header="Named entity recognition instructions">
<ol>
<li><strong>Read</strong> the text carefully.</li>
<li><strong>Highlight</strong> words, phrases, or sections of the text.</li>
<li><strong>Choose</strong> the label that best matches what you have highlighted.</li>
<li>To <strong>change</strong> a label, choose highlighted text and select a new label.</li>
<li>To <strong>remove</strong> a label from highlighted text, choose the X next to the abbreviated label name on the highlighted text.</li>
<li>You can select all of a previously highlighted text, but not a portion of it.</li>
</ol>
</full-instructions>
<short-instructions>
Apply labels to words or phrases.
</short-instructions>
<div id="additionalQuestions" style="margin-top: 20px">
<h3>
What is the overall subject of this text?
</h3>
<crowd-radio-group>
<crowd-radio-button name="tech" value="tech">Technology</crowd-radio-button>
<crowd-radio-button name="politics" value="politics">Politics</crowd-radio-button>
</crowd-radio-group>
</div>
</crowd-entity-annotation>
<script>
document.addEventListener('all-crowd-elements-ready', () => {
document
.querySelector('crowd-entity-annotation')
.shadowRoot
.querySelector('crowd-form')
.form
.appendChild(additionalQuestions);
});
</script>
Using the above code, I was able to view the highlighted initial-value that we provided to the human workers as a head start by applying an ‘initial-value’ label so that they could either accept or modify it :
Below is the output after running the above code:
If you have any difficulty in verifying any of the above mentioned points or if you still run into issue, Please reach out to AWS Support[+] (Sagemaker), along with your issue/use case in details and we would be happy to assist you further. [+] Creating support cases and case management - https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-casehttps://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-case
Relevant content
- asked 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago