Commit 33286c9
authored
Fix issue with resolving final token in SpanResolver (#27)
* Fix issue with resolving final token in SpanResolver
The SpanResolver seems unable to include the final token in a Doc in
output spans. It will even produce empty spans instead of doing so.
This makes changes so that within the model span end indices are treated
as inclusive, and converts them back to exclusive when annotating docs.
This has been tested to work, though an automated test should be added.
* Modify tests so last token is in a mention
Running the modify tests without the changes from the previous commit,
they fail. This demonstrates and clarifies the bug.
* Add / rearrange comments1 parent 98b00ea commit 33286c9
File tree
3 files changed
+11
-5
lines changed- spacy_experimental/coref
- tests
3 files changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
| 180 | + | |
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| |||
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
277 | | - | |
278 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
279 | 282 | | |
| 283 | + | |
280 | 284 | | |
281 | 285 | | |
282 | 286 | | |
| |||
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
299 | | - | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
303 | 307 | | |
| 308 | + | |
304 | 309 | | |
305 | 310 | | |
306 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments