Skip to content

Commit 25f5879

Browse files
committed
release v2.17.0; merge in changes from branch v2.16 into branche master
1 parent a60660d commit 25f5879

File tree

14 files changed

+153
-169
lines changed

14 files changed

+153
-169
lines changed

Changes.txt

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
1-
Version 2.14.4
2-
2025-10-29
3-
4-
* no attribute extpos in dtd
5-
6-
7-
Version 2.14.3
8-
2025-10-27
9-
10-
* fix version conflict
11-
12-
Version 2.14.2
13-
2025-10-25
14-
15-
* bugfix dummy output without comments
16-
17-
18-
Version 2.14.1
19-
2025-10-24
20-
21-
* several updates in UD parser
22-
* corrections to dummy output
23-
* new function: DtdVersion()
24-
* commands: bugfix option -c
1+
Version 2.17.0
2+
2025-11-07
3+
4+
* upgrade to Universal Dependencies version 2.17
5+
* upgrade to alpino_ds.dtd version 1.17 (this 17 has no relation to the one
6+
above)
7+
* library:
8+
* new function DtdVersion()
9+
* new function Release() returns software version
10+
* function VersionID() no longer returns an updated number when the
11+
software is updated, unless the results of the parser have
12+
changed
13+
* commands:
14+
* bugfix for option -c
15+
* other:
16+
* code clean-up
2517

2618

2719
Version 2.14.0

LET-OP.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Wanneer er een nieuwere versie van `alpinods` gebruikt wordt
2+
moeten waarschijnlijk deze regels in `v2/alpino.go` aangepast worden:
3+
4+
```go
5+
if v1 < 1 || (v1 == 1 && v2 < 17) {
6+
alpino.Version = "1.17"
7+
}
8+
```

alpino_ds.dtd

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
<!-- Alpino Dependency Structures DTD -->
44

55
<!--
6+
Versie 1.17 per november 2025
7+
8+
- feature PronType for UD, added possible values: Art Neg Tot
9+
- new features for UD: ExtPos Mood
10+
11+
Versie 1.16 per februari 2023
12+
- is_np
13+
- is_vorfeld, is_nachfeld
14+
15+
Versie 1.15 v_per person information of finite verb
16+
17+
Versie 1.14 dropped_prs, dropped_agr
18+
19+
Versie 1.13 mwu_sense and mwu_root are gone, no longer used
20+
621
Versie 1.12 per 16 september 2020
722
823
- sonar_ne_class, sonar_ne_begin, sonar_ne_end, sonar_ne
@@ -52,7 +67,6 @@ pvagr (ev|mv|met-t) #IMPLIED
5267
pvtijd (tgw|verl|conj) #IMPLIED
5368
spectype (afgebr|onverst|vreemd|deeleigen|meta|comment|achter|afk|symb|enof) #IMPLIED
5469
status (vol|red|nadr) #IMPLIED
55-
stype (declarative|imparative|topic_drop|ynquestions|whquestion) #IMPLIED
5670
vwtype (pr|pers|refl|recip|bez|vb|vrag|betr|excl|aanw|onbep) #IMPLIED
5771
vztype (init|versm|fin) #IMPLIED
5872
wvorm (pv|inf|od|vd) #IMPLIED
@@ -64,12 +78,13 @@ Abbr (Yes) #IMPLIED
6478
Case (Nom|Acc|Gen|Dat) #IMPLIED
6579
Definite (Def|Ind) #IMPLIED
6680
Degree (Pos|Cmp|Sup) #IMPLIED
81+
ExtPos (ADJ|ADP|ADV|AUX|CCONJ|DET|INTJ|PRON|PROPN|SCONJ) #IMPLIED
6782
Foreign (Yes) #IMPLIED
6883
Gender CDATA #IMPLIED
69-
Mood (Ind|Imp|Sub) #IMPLIED
84+
Mood (Ind|Imp|Sub) #IMPLIED
7085
Number (Sing|Plur) #IMPLIED
7186
Person (1|2|3) #IMPLIED
72-
PronType (Prs|Rcp|Int|Dem|Ind|Rel|Art) #IMPLIED
87+
PronType (Art|Dem|Ind|Int|Neg|Prs|Rcp|Rel|Tot) #IMPLIED
7388
Reflex (Yes) #IMPLIED
7489
Tense (Past|Pres) #IMPLIED
7590
VerbForm (Fin|Inf|Part) #IMPLIED
@@ -239,6 +254,9 @@ recursion_limit CDATA #IMPLIED
239254
for modified particles in conjunction, "hij ademde in en hard uit" -->
240255

241256

257+
<!-- MWU_ROOT and MWU_SENSE are obsolete as of 1.13 -->
258+
259+
242260
<!ATTLIST node
243261
rel (hdf|hd|cmp|sup|su|obj1|pobj1|obj2|se|pc|vc|svp|predc|ld|me|
244262
predm|obcomp|mod|body|det|app|whd|rhd|cnj|crd|nucl|sat|tag|
@@ -289,6 +307,9 @@ recursion_limit CDATA #IMPLIED
289307
personalized CDATA #IMPLIED
290308
rnum CDATA #IMPLIED
291309
stype CDATA #IMPLIED
310+
dropped_prs CDATA #IMPLIED
311+
dropped_agr CDATA #IMPLIED
312+
v_per CDATA #IMPLIED
292313

293314
pb
294315
(Arg0|Arg1|Arg2|Arg3|Arg4|Arg5|ArgM-ADV|ArgM-CAU|ArgM-DIR|ArgM-DIS|
@@ -336,6 +357,10 @@ recursion_limit CDATA #IMPLIED
336357
sonar_ne_end CDATA #IMPLIED
337358
sonar_ne CDATA #IMPLIED
338359

360+
is_np (true) #IMPLIED
361+
is_vorfeld (true) #IMPLIED
362+
is_nachfeld (true) #IMPLIED
363+
339364
>
340365

341366
<!-- pb - propbank role op verzoek van Universiteit Utrecht -->

codemeta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"sameAs": "https://tools.clariah.nl/alud",
1414
"dateCreated": "2019-06-30",
1515
"datePublished": "2019-11-27",
16-
"dateModified": "2025-10-29",
17-
"version": "2.14.4",
16+
"dateModified": "2025-11-07",
17+
"version": "2.17.0",
1818
"releaseNotes": "https://github.com/rug-compling/alud/blob/master/Changes.txt",
1919
"codeRepository": "https://github.com/rug-compling/alud.git",
2020
"readme": "https://github.com/rug-compling/alud/blob/master/README.md",

v2/alpino.go

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ func Alpino(alpino_doc []byte, conllu, auto string) (alpino string, err error) {
5050
}
5151
var reset func(*nodeType)
5252
reset = func(node *nodeType) {
53-
node.Ud = &udType{Dep: make([]depType, 0)}
53+
node.Ud = &alpinods.Ud{Dep: make([]alpinods.Dep, 0)}
5454
if node.Node != nil {
5555
for _, n := range node.Node {
5656
reset(n)
5757
}
5858
}
5959
}
6060
reset(alp.Node)
61-
alp.UdNodes = []*udNodeType{}
62-
alp.Conllu = &conlluType{Conllu: conllu, Auto: auto}
61+
alp.Root = []*deprelType{}
62+
alp.Conllu = &alpinods.Conllu{Conllu: conllu, Auto: auto}
6363
alpinoDo(conllu, &alp)
6464
alpino, err = alpinoFormat(&alp), nil
6565
return // geen argumenten i.v.m. recover
@@ -101,15 +101,15 @@ func UdAlpino(alpino_doc []byte, filename, sentid string) (alpino string, err er
101101
r(alp.Node)
102102
}
103103

104-
if alp.Sentence.SentId == "" {
104+
if alp.Sentence.SentID == "" {
105105
id := filepath.Base(filename)
106106
if strings.HasSuffix(id, ".xml") {
107107
id = id[:len(id)-4]
108108
}
109-
alp.Sentence.SentId = id
109+
alp.Sentence.SentID = id
110110
}
111-
alp.UdNodes = []*udNodeType{}
112-
alp.Conllu = &conlluType{
111+
alp.Root = []*deprelType{}
112+
alp.Conllu = &alpinods.Conllu{
113113
Status: "error",
114114
Error: e,
115115
Auto: VersionID(),
@@ -139,13 +139,13 @@ func alpinoRestore(q *context) {
139139
}
140140
}
141141
for _, node := range q.allnodes {
142-
node.Ud = &udType{Dep: make([]depType, 0)}
142+
node.Ud = &alpinods.Ud{Dep: make([]alpinods.Dep, 0)}
143143
node.Begin /= 1000
144144
node.End /= 1000
145145
node.ID /= 1000
146146
}
147-
q.alpino.UdNodes = []*udNodeType{}
148-
q.alpino.Conllu = &conlluType{Auto: VersionID()}
147+
q.alpino.Root = []*deprelType{}
148+
q.alpino.Conllu = &alpinods.Conllu{Auto: VersionID()}
149149
}
150150

151151
func alpinoFormat(alpino *alpino_ds) string {
@@ -159,8 +159,8 @@ func alpinoFormat(alpino *alpino_ds) string {
159159
v2 = 0
160160
}
161161
}
162-
if v1 < 1 || (v1 == 1 && v2 < 10) {
163-
alpino.Version = "1.10"
162+
if v1 < 1 || (v1 == 1 && v2 < 17) {
163+
alpino.Version = "1.17"
164164
}
165165

166166
b, _ := xml.MarshalIndent(alpino, "", " ")
@@ -189,8 +189,8 @@ func alpinoDo(conllu string, alpino *alpino_ds) {
189189
}
190190
}
191191

192-
udNodeList := make([]*udNodeType, 0)
193-
eudNodeList := make([]*udNodeType, 0)
192+
udNodeList := make([]*deprelType, 0)
193+
eudNodeList := make([]*deprelType, 0)
194194
nodeDepList := make([]nodeDepType, 0)
195195

196196
for _, line := range lines {
@@ -220,8 +220,8 @@ func alpinoDo(conllu string, alpino *alpino_ds) {
220220
if len(dd) > 1 {
221221
aux = dd[1]
222222
}
223-
d := depType{
224-
Id: a[0],
223+
d := alpinods.Dep{
224+
ID: a[0],
225225
Head: dep[0],
226226
Deprel: dep[1],
227227
DeprelMain: dd[0],
@@ -237,7 +237,7 @@ func alpinoDo(conllu string, alpino *alpino_ds) {
237237
continue
238238
}
239239

240-
node.Ud.Id = a[0]
240+
node.Ud.ID = a[0]
241241
node.Ud.Form = a[1]
242242
node.Ud.Lemma = a[2]
243243
node.Ud.Upos = noe(a[3])
@@ -258,19 +258,19 @@ func alpinoDo(conllu string, alpino *alpino_ds) {
258258
node.Ud.ExtPos = feats["ExtPos"]
259259
node.Ud.Foreign = feats["Foreign"]
260260
node.Ud.Gender = feats["Gender"]
261-
// node.Ud.Mood = feats["Mood"]
261+
node.Ud.Mood = feats["Mood"]
262262
node.Ud.Number = feats["Number"]
263263
node.Ud.Person = feats["Person"]
264264
node.Ud.PronType = feats["PronType"]
265265
node.Ud.Reflex = feats["Reflex"]
266266
node.Ud.Tense = feats["Tense"]
267267
node.Ud.VerbForm = feats["VerbForm"]
268268

269-
ud := udNodeType{
269+
ud := deprelType{
270270
recursion: make([]string, 0),
271271

272272
XMLName: xml.Name{Local: node.Ud.DeprelMain},
273-
Id: node.Ud.Id,
273+
ID: node.Ud.ID,
274274
Form: node.Ud.Form,
275275
Lemma: node.Ud.Lemma,
276276
Upos: node.Ud.Upos,
@@ -302,7 +302,6 @@ func alpinoDo(conllu string, alpino *alpino_ds) {
302302
Pvtijd: node.Pvtijd,
303303
Spectype: node.Spectype,
304304
Status: node.Status,
305-
// Stype: node.Stype,
306305
Vwtype: node.Vwtype,
307306
Vztype: node.Vztype,
308307
Wvorm: node.Wvorm,
@@ -316,11 +315,11 @@ func alpinoDo(conllu string, alpino *alpino_ds) {
316315
node := nd.node
317316
dep := nd.dep
318317

319-
ud := udNodeType{
318+
ud := deprelType{
320319
recursion: make([]string, 0),
321320

322321
XMLName: xml.Name{Local: dep.DeprelMain},
323-
Id: dep.Id,
322+
ID: dep.ID,
324323
Form: node.Ud.Form,
325324
Lemma: node.Ud.Lemma,
326325
Upos: node.Ud.Upos,
@@ -352,7 +351,6 @@ func alpinoDo(conllu string, alpino *alpino_ds) {
352351
Pvtijd: node.Pvtijd,
353352
Spectype: node.Spectype,
354353
Status: node.Status,
355-
// Stype: node.Stype,
356354
Vwtype: node.Vwtype,
357355
Vztype: node.Vztype,
358356
Wvorm: node.Wvorm,
@@ -361,28 +359,28 @@ func alpinoDo(conllu string, alpino *alpino_ds) {
361359
eudNodeList = append(eudNodeList, &ud)
362360
}
363361

364-
alpino.UdNodes = make([]*udNodeType, 0)
362+
alpino.Root = make([]*deprelType, 0)
365363

366364
for _, n := range udNodeList {
367365
if n.Head == "0" {
368-
alpino.UdNodes = append(alpino.UdNodes, n)
366+
alpino.Root = append(alpino.Root, n)
369367
}
370368
}
371369

372370
for _, n := range eudNodeList {
373371
if n.Head == "0" {
374-
alpino.UdNodes = append(alpino.UdNodes, n)
372+
alpino.Root = append(alpino.Root, n)
375373
}
376374
}
377375

378-
for i, root := range alpino.UdNodes {
379-
var items []*udNodeType
376+
for i, root := range alpino.Root {
377+
var items []*deprelType
380378
if i == 0 {
381379
items = udNodeList
382380
} else {
383381
items = eudNodeList
384382
}
385-
root.UdNodes = make([]*udNodeType, 0)
383+
root.Deps = make([]*deprelType, 0)
386384
expand(root, items)
387385
}
388386
minify(alpino)
@@ -401,7 +399,7 @@ func minify(alpino *alpino_ds) {
401399
if alpino.Parser != nil && alpino.Parser.Build == "" && alpino.Parser.Date == "" && alpino.Parser.Cats == "" && alpino.Parser.Skips == "" {
402400
alpino.Parser = nil
403401
}
404-
if alpino.Sentence != nil && alpino.Sentence.Sent == "" && alpino.Sentence.SentId == "" {
402+
if alpino.Sentence != nil && alpino.Sentence.Sentence == "" && alpino.Sentence.SentID == "" {
405403
alpino.Sentence = nil
406404
}
407405
if alpino.Comments != nil && (alpino.Comments.Comment == nil || len(alpino.Comments.Comment) == 0) {
@@ -415,7 +413,7 @@ func minifyNode(node *nodeType) {
415413
return
416414
}
417415
if node.Ud != nil {
418-
if node.Ud.Id == "" {
416+
if node.Ud.ID == "" {
419417
node.Ud = nil
420418
} else {
421419
if len(node.Ud.Dep) == 0 {
@@ -468,17 +466,17 @@ func getItems(s string) map[string]string {
468466
return m
469467
}
470468

471-
func expand(udnode *udNodeType, items []*udNodeType) {
469+
func expand(udnode *deprelType, items []*deprelType) {
472470
for _, item := range items {
473-
if item.Head == udnode.Id {
474-
it := new(udNodeType)
471+
if item.Head == udnode.ID {
472+
it := new(deprelType)
475473
*it = *item
476-
it.UdNodes = make([]*udNodeType, 0)
477-
it.recursion = append([]string{udnode.Id}, udnode.recursion...)
478-
udnode.UdNodes = append(udnode.UdNodes, it)
474+
it.Deps = make([]*deprelType, 0)
475+
it.recursion = append([]string{udnode.ID}, udnode.recursion...)
476+
udnode.Deps = append(udnode.Deps, it)
479477
}
480478
}
481-
for _, un := range udnode.UdNodes {
479+
for _, un := range udnode.Deps {
482480
if recursionLimit(un.recursion) {
483481
un.RecursionLimit = "TOO DEEP"
484482
} else {

0 commit comments

Comments
 (0)