hi @cheyanneb!
For pre-annotated spans, you'd need data more like this (this is the output from spans_manual
):
{
"text": "Multivariate analysis revealed that septic shock and bacteremia originating from lower respiratory tract infection were two independent risk factors for 30-day mortality.",
"tokens": [
{"text": "Multivariate", "start": 0, "end": 12, "id": 0, "ws": true},
{"text": "analysis", "start": 13, "end": 21, "id": 1, "ws": true},
{"text": "revealed", "start": 22, "end": 30, "id": 2, "ws": true},
{"text": "that", "start": 31, "end": 35, "id": 3, "ws": true},
{"text": "septic", "start": 36, "end": 42, "id": 4, "ws": true},
{"text": "shock", "start": 43, "end": 48, "id": 5, "ws": true},
{"text": "and", "start": 49, "end": 52, "id": 6, "ws": true},
{"text": "bacteremia", "start": 53, "end": 63, "id": 7, "ws": true},
{"text": "originating", "start": 64, "end": 75, "id": 8, "ws": true},
{"text": "from", "start": 76, "end": 80, "id": 9, "ws": true},
{"text": "lower", "start": 81, "end": 86, "id": 10, "ws": true},
{"text": "respiratory", "start": 87, "end": 98, "id": 11, "ws": true},
{"text": "tract", "start": 99, "end": 104, "id": 12, "ws": true},
{"text": "infection", "start": 105, "end": 114, "id": 13, "ws": true},
{"text": "were", "start": 115, "end": 119, "id": 14, "ws": true},
{"text": "two", "start": 120, "end": 123, "id": 15, "ws": true},
{"text": "independent", "start": 124, "end": 135, "id": 16, "ws": true},
{"text": "risk", "start": 136, "end": 140, "id": 17, "ws": true},
{"text": "factors", "start": 141, "end": 148, "id": 18, "ws": true},
{"text": "for", "start": 149, "end": 152, "id": 19, "ws": true},
{"text": "30", "start": 153, "end": 155, "id": 20, "ws": false},
{"text": "-", "start": 155, "end": 156, "id": 21, "ws": false},
{"text": "day", "start": 156, "end": 159, "id": 22, "ws": true},
{"text": "mortality", "start": 160, "end": 169, "id": 23, "ws": false},
{"text": ".", "start": 169, "end": 170, "id": 24, "ws": false}
],
"spans": [
{"start": 0, "end": 21, "token_start": 0, "token_end": 1, "label": "METHOD"},
{"start": 36, "end": 48, "token_start": 4, "token_end": 5, "label": "FACTOR"},
{"start": 36, "end": 48, "token_start": 4, "token_end": 5, "label": "CONDITION"},
{"start": 53, "end": 114, "token_start": 7, "token_end": 13, "label": "FACTOR"},
{"start": 53, "end": 63, "token_start": 7, "token_end": 7, "label": "CONDITION"},
{"start": 81, "end": 114, "token_start": 10, "token_end": 13, "label": "CONDITION"},
{"start": 153, "end": 169, "token_start": 20, "token_end": 23, "label": "EFFECT"}
]
}
Your data didn't look like it had spans, only "tokens"
that were put into the "accept"
tag. Let me know if you have questions.