groepering en tags

This commit is contained in:
Peter Kleiweg
2026-04-09 17:56:59 +02:00
parent b05ff1a4a9
commit 970e133e65
15 changed files with 308 additions and 170 deletions

View File

@@ -1,12 +0,0 @@
alto *.data.dz tq:nieuwe_namen.xq | sort | uniq > items.txt
voor elk item dit bijwerken:
type Item struct {
count int
tags map[string]int
}
items := make(map[string]Item)

16
xquery/locaties.xq Normal file
View File

@@ -0,0 +1,16 @@
for $x in //node[(@neclass="LOC" and not(@rel="mwp")) or (@cat="mwu" and node[@pt="spec" and @neclass="LOC"])]
return ( <i>
<m> {replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "")} </m>
{
for $i in data(/alpino_ds/metadata/meta[@name="tag"]/@value)
return <t> {$i} </t>
}
<w> { data($x//@lemma) } </w>
</i>, '&#xa;' )
(:
<m>{ data(/alpino_ds/sentence/@sentid) }</m>
<m>{ replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "") }</m>
:)

View File

@@ -2,10 +2,6 @@ for $x in //node[((@cat="mwu" and node[@pt="spec"]) or (@pt and @*="eigen" and n
return ( <i>
<m> {replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "")} </m>
{
for $i in data(/alpino_ds/metadata/meta[@name="cat"]/@value)
return <c> {$i} </c>
}
{
for $i in data(/alpino_ds/metadata/meta[@name="tag"]/@value)
return <t> {$i} </t>
}

16
xquery/nieuwe_woorden.xq Normal file
View File

@@ -0,0 +1,16 @@
for $x in //node[@his and not(@rel="mwp" or @cat="mwu") and not(@his="normal" or @his="name" or @his="prefix_name" or @his_1="decap" or @his_1="0" or @his="skip" or @his="robust_skip" or @his="w_dia" or @his="wo_dia" or @his="within_word_conjunct")]
return ( <i>
<m> {replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "")} </m>
{
for $i in data(/alpino_ds/metadata/meta[@name="tag"]/@value)
return <t> {$i} </t>
}
<w> { data($x//@word) } </w>
</i>, '&#xa;' )
(:
<m>{ data(/alpino_ds/sentence/@sentid) }</m>
<m>{ replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "") }</m>
:)

16
xquery/organisaties.xq Normal file
View File

@@ -0,0 +1,16 @@
for $x in //node[(@neclass="ORG" and not(@rel="mwp")) or (@cat="mwu" and node[@pt="spec" and @neclass="ORG"])]
return ( <i>
<m> {replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "")} </m>
{
for $i in data(/alpino_ds/metadata/meta[@name="tag"]/@value)
return <t> {$i} </t>
}
<w> { data($x//@lemma) } </w>
</i>, '&#xa;' )
(:
<m>{ data(/alpino_ds/sentence/@sentid) }</m>
<m>{ replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "") }</m>
:)

16
xquery/overige_namen.xq Normal file
View File

@@ -0,0 +1,16 @@
for $x in //node[(@neclass="MISC" and not(@rel="mwp")) or (@cat="mwu" and node[@pt="spec" and @neclass="MISC"])]
return ( <i>
<m> {replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "")} </m>
{
for $i in data(/alpino_ds/metadata/meta[@name="tag"]/@value)
return <t> {$i} </t>
}
<w> { data($x//@lemma) } </w>
</i>, '&#xa;' )
(:
<m>{ data(/alpino_ds/sentence/@sentid) }</m>
<m>{ replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "") }</m>
:)

16
xquery/personen.xq Normal file
View File

@@ -0,0 +1,16 @@
for $x in //node[(@neclass="PER" and not(@rel="mwp")) or (@cat="mwu" and node[@pt="spec" and @neclass="PER"])]
return ( <i>
<m> {replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "")} </m>
{
for $i in data(/alpino_ds/metadata/meta[@name="tag"]/@value)
return <t> {$i} </t>
}
<w> { data($x//@lemma) } </w>
</i>, '&#xa;' )
(:
<m>{ data(/alpino_ds/sentence/@sentid) }</m>
<m>{ replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "") }</m>
:)