Hi,
I’m trying to add a new receipe to do text tagging and I’ve written (copy-pasted from the example about sentiments) something like:
import prodigy
from prodigy.components.loaders import JSONL
@prodigy.recipe('superconductor-material-recipe',
dataset=prodigy.recipe_args['dataset'],
file_path=("Path to texts", "positional", None, str))
def sentiment(dataset, file_path):
"""Annotate the sentiment of texts using different mood options."""
stream = JSONL(file_path) # load in the JSONL file
# stream = add_options(stream) # add options to each task
return {
'dataset': dataset, # save annotations in this dataset
'view_id': 'ner_manual', # use the choice interface
'stream': stream,
}
Then when trying to import it I got this criptic message:
(pyscript) Lucas-MacBook-Pro:prodigy-preprocessing lfoppiano$ prodigy superconductor-material-recipe supercon1 superconductor-material-recipe.py -h
✨ ERROR: Can't find recipe or command
'superconductor-material-recipe'.
Any idea?
Thank you in advance
Luca