Hello,
So I'm trying to set up a task with a custom recipe. I can't figure out why the text isn't getting displayed at all. It shows up when I use a built-in recipe or a random recipe I got from the repo, so it's definitely my code and not my data that's a problem. As I'm just starting to use this, it may be something really stupid but hey, that's what this forum is for.
This is the custom recipe:
import prodigy
from prodigy.components.loaders import TXT
from prodigy.util import split_string
from collections import Counter
from typing import List, Optional
@prodigy.recipe(
"time",
dataset=("The dataset to use", "positional", None, str),
source=("The source data as a TXT file", "positional", None, str),
)
def time(dataset: str, source: str):
stream = TXT(source)
return {
"view_id": "blocks", # Annotation interface to use
"config": {
"blocks": [
{
"view_id": "ner_manual",
"labels": ["Time Expression"],
},
{
"view_id": "text_input",
"field_rows": 1,
"field_autofocus":True,
"field_label": "What is the start date of this sentence",
"field_placeholder": "01.01.2016",
"text":None
},
{
"view_id": "text_input",
"field_rows": 1,
"field_autofocus":True,
"field_label": "What is the end date of this sentence",
"field_placeholder": "01.01.2016",
"text":None
},
{
"view_id": "text_input",
"field_rows": 1,
"field_autofocus":True,
"field_label": "What is the span in days of this sentence",
"field_placeholder": "1",
"text":None
},
]
},
"dataset": dataset, # Name of dataset to save annotations
"stream": stream, # Incoming stream of examples
}
This is a sample of my data.
We will introduce a standalone award that recognises and rewards Irish-based artists
establish a dedicated philanthropic fund to help drive philanthropic giving to our cultural institutions
We will extend the Section 1003 tax relief to important heritage items that are donated to regional museums, as well as cultural institutions
Fine Gael will work to further improve the Section 481 Tax Relief
introduce a new scheme aimed at increasing the number of women working in the film industry
set up an apprenticeship programme to address the skills needed in the audio-visual sector
establish a new online portal which will act as a skills database for the audiovisual sector
establish a Creative Sector Taskforce, which will draw up an Action Plan for Growth across the entire sector, including audiovisual, gaming, animation and music.
How do I get it to do the thing?