Commit 38f8c0b
committed
check if IDs (node.ord) form a valid sequence in *.conll and *.conllup
There are e.g. files with gaps (1,2,3,5). Failing to detect this
results in wrong parsing and even `fix_cycles=1` may result in infinite loop.
When a node is created using `root.create_child()`,
it already has `node.ord` set up correctly as the last node in the tree.
For *.conllu we could do the same, but we don't do that
because Read.Conllu is speed critical
and invalid files can be detected using `validate.py`.1 parent 0d1d6fd commit 38f8c0b
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
0 commit comments