Relation Extraction
relations · Built-in task recipeAnnotate relations between entities, spans or tokens. Also supports joint span and relation annotation.
If you've connected Ellf to your coding assistant, it can set up the task for you: it knows the recipe's settings, can create the datasets and assets it needs and will ask you about anything it can't work out itself.
✳︎Claude Code: Setting up a task
› Set up an Ellf task using the Relation Extraction recipe (relations) and help me choose the right settings for my data.- In the app, go to TasksNew task.
- Select the Relation Extraction recipe under Text.
- Fill in the form – you'll need to provide Dataset, Input data asset, Labels and Model. Everything else has sensible defaults.
- Create the task. It starts on your cluster straight away.
Create the task with ellf tasks create and the recipe name. All settings from the form are available as arguments. To view all recipe arguments, run ellf tasks create relations --help.
| Argument | Type | Description | Default |
|---|---|---|---|
--name | str | Name of the task | None |
--dataset | str | Dataset: Select an existing dataset or create a new one. | |
--input | str | Input data asset: Upload data to your cluster and it will be available here. | |
--label | List[str] | Labels: Comma-separated list of labels to annotate. | |
--span-label | List[str] | Span labels: Comma-separated list of span labels to annotate. | None |
--model-blank | bool | Blank spaCy model: For tokenization only, no suggestions.One option for Model | None |
--model.lang | str | Language: Base language to use for tokenization.One option for ModelAvailable: af, am, ar, az, bg, bn, bo, ca, cs, da, de, dsb, el, en, es, et, eu, fa, fi, fo, fr, ga, gd, grc, gu, he, hi, hr, hsb, ht, hu, hy, id, is, it, ja, kmr, kn, ko, ky, la, lb, lg, lij, lt, lv, mk, ml, mr, ms, nb, ne, nl, nn, pl, pt, ro, ru, sa, si, sk, sl, sq, sr, sv, ta, te, th, ti, tl, tn, tr, tt, uk, ur, vi, xx, yo, zh | "en" |
--model.name | str | Model: If you have custom pipelines, you can add them to your cluster.One option for Model | None |
--model.add-ents | bool | Add named entities predicted by the modelOne option for Model | False |
--model.add-nps | bool | Add noun phrases predicted by the modelOne option for Model | False |
--patterns | str | Patterns: Rules to generate pattern suggestions. Can be uploaded to your cluster. | None |
--disable-patterns | str | Disable patterns: Patterns whose matches are disabled: the tokens become unselectable, which guides annotators towards the valid options. Same file format as the patterns above. Can be uploaded to your cluster. | None |
--settings.instructions | str | Instructions: Markdown document with annotation guidelines, shown to annotators and agents. | None |
--settings.goal | str | Data collection goalAvailable: nooverlap, overlap | "nooverlap" |
--settings.config | str | Prodigy config: JSON object of Prodigy config to override, e.g. the theme, keyboard shortcuts or interface style. | "" |
--settings.exclude | List[str] | Exclude datasets: Datasets containing annotations to exclude. | None |
--project-id | str | Project ID to add task to. Defaults to your saved project. | None |
--worker-class | str | Worker class to launch the task on, as configured on your cluster | None |