groepering en tags
This commit is contained in:
12
xquery/howto
12
xquery/howto
@@ -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
16
xquery/locaties.xq
Normal 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>, '
' )
|
||||
|
||||
(:
|
||||
|
||||
<m>{ data(/alpino_ds/sentence/@sentid) }</m>
|
||||
<m>{ replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "") }</m>
|
||||
|
||||
:)
|
||||
@@ -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
16
xquery/nieuwe_woorden.xq
Normal 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>, '
' )
|
||||
|
||||
(:
|
||||
|
||||
<m>{ data(/alpino_ds/sentence/@sentid) }</m>
|
||||
<m>{ replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "") }</m>
|
||||
|
||||
:)
|
||||
16
xquery/organisaties.xq
Normal file
16
xquery/organisaties.xq
Normal 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>, '
' )
|
||||
|
||||
(:
|
||||
|
||||
<m>{ data(/alpino_ds/sentence/@sentid) }</m>
|
||||
<m>{ replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "") }</m>
|
||||
|
||||
:)
|
||||
16
xquery/overige_namen.xq
Normal file
16
xquery/overige_namen.xq
Normal 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>, '
' )
|
||||
|
||||
(:
|
||||
|
||||
<m>{ data(/alpino_ds/sentence/@sentid) }</m>
|
||||
<m>{ replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "") }</m>
|
||||
|
||||
:)
|
||||
16
xquery/personen.xq
Normal file
16
xquery/personen.xq
Normal 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>, '
' )
|
||||
|
||||
(:
|
||||
|
||||
<m>{ data(/alpino_ds/sentence/@sentid) }</m>
|
||||
<m>{ replace(data(/alpino_ds/sentence/@sentid), "\.[^.]*$", "") }</m>
|
||||
|
||||
:)
|
||||
Reference in New Issue
Block a user