I would like to know how to label a text as it is in ner.manual recipe but then also use choice recipe to tell if the text is difficult to label or not, so we can store data of a specific row for a future NER model and Text cat model as well.
We want to save us time to do it separately because is the same text that we would tag.
Let me know if it is option to join recipes.
I would like to know how to create an additional text box to add unusual comments about labeling on specific text using Prodigy.
We would like to label a text and if it is a special case we would like to add comment to the row and save it for later processing. We already tried html view and config with html but I did not work so well.
Any advices for this task or templates that we can follow.
In the meantime, you can use custom JavaScript to manipulate a given interface, add elements to it and make them interactive. Here's a super simple example that adds a text field and a submit button. When the submit button is clicked, the current task is updated and the text in the input is added as the "comment" field:
document.addEventListener('prodigymount', event => {
const container = document.querySelector('.prodigy-content')
// Create input and button and add them to annotation card
const input = document.createElement('input')
input.style = "border: 1px solid"
const button = document.createElement('button')
button.textContent = 'Submit'
container.appendChild(input)
container.appendChild(button)
button.addEventListener('click', event => {
// Update current task if button is clicked
console.log(input.value)
window.prodigy.update({ comment: input.value })
})
})
When I use html view I can see the text box and the submit button, but when I use the ner_manual I can not see anymore the object. How can I do to add a custom element keeping the current element on the screen?
The HTML template is only used if you’re actually using the html interface (otherwise, it’s be kinda unclear where that content would go). If you’re using a different interface, you’ll have to place your elements in JavaScript. So instead of appending to your custom container .prodigy-content-custom, you could append to the existing .prodigy-content.