PDF Span Annotation
pdf_spans · Built-in task recipeAnnotate text spans, e.g. named entities, in PDFs pre-processed into a Layout asset by the Extract PDF layout action.
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 PDF Span Annotation recipe (pdf_spans) and help me choose the right settings for my data.- In the app, go to TasksNew task.
- Select the PDF Span Annotation recipe under PDF.
- Fill in the form – you'll need to provide Dataset, PDF layout, Annotation mode and Labels. 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 pdf_spans --help.
| Argument | Type | Description | Default |
|---|---|---|---|
--name | str | Name of the task | None |
--dataset | str | Dataset: Select an existing dataset or create a new one. | |
--layout | str | PDF layout: Text and layout extracted from a PDF asset by the Extract PDF layout action. | |
--view-full-pages | bool | Full pages: Annotate whole pages, grouped into one carousel per document or as one task per page.One option for Annotation mode | None |
--view.split-pages | bool | View pages as separate tasks: One task per page, instead of one task per document with its pages in a carousel.One option for Annotation mode | False |
--view.layout-types | List[str] | Layout types to focus on: Comma-separated list of layout span labels to annotate section-by-section, e.g. text, list_item or section_header. The current section is highlighted in the visual preview.One option for Annotation mode | None |
--label | List[str] | Labels: Comma-separated list of labels to annotate. | |
--model | str | Trained spaCy model: Include named entity suggestions from the model's predictions. The model needs an NER component. | None |
--disable | List[str] | Disable layout types: Layout span labels to disable and make unselectable in the UI. | [] |
--hide-preview | bool | Hide page image preview: Don't show the rendered PDF page image alongside the text. Useful when images are not needed or to speed up loading. | False |
--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 |