Commit 381a2d1
committed
allow
Add the `add_mwt` option to `node.descendants()`, `node.children()` etc.
The MWT objects do not have the same methods&properties as Node objects,
so one has to be careful when using the resulting list with a mixure of both,
but there are usecases when it is useful to have such a mixed list
(with MWTs preceding their words, similarly to the CoNLL-U format).node.descendants(add_mwt=True)
1 parent 717af29 commit 381a2d1
1 file changed
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| 1154 | + | |
1154 | 1155 | | |
1155 | 1156 | | |
1156 | 1157 | | |
| |||
1164 | 1165 | | |
1165 | 1166 | | |
1166 | 1167 | | |
1167 | | - | |
| 1168 | + | |
1168 | 1169 | | |
1169 | 1170 | | |
1170 | 1171 | | |
1171 | 1172 | | |
| 1173 | + | |
1172 | 1174 | | |
1173 | | - | |
| 1175 | + | |
1174 | 1176 | | |
1175 | | - | |
1176 | | - | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
1177 | 1190 | | |
1178 | 1191 | | |
1179 | 1192 | | |
| |||
0 commit comments