Labeling
Labeling Widget for Marimo
LabelingWidget
Bases: BaseWidget
A text labeling widget where students drag numbered labels to text lines.
Attributes:
| Name | Type | Description |
|---|---|---|
question |
str
|
The question text to display |
labels |
list
|
List of label texts (shown on left) |
text_lines |
list
|
List of text lines to be labeled (shown on right) |
correct_labels |
dict
|
Mapping of line indices to lists of correct label indices |
value |
dict
|
Current state with 'placed_labels', 'score', 'total', and 'correct' keys |
Source code in src/marimo_learn/labeling.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
Example
