1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 | declare variable $count as xs:integer := 0;
for $p in doc("../../talismane_xml/3244.xml")//p
for $item in $p/item
let $conc2 :=
if (($item/a[4]/text()="NC") and ($item/following-sibling::item[1]/a[4]/text()="P") and ($item/following-sibling::item[2]/a[4]/text()="NC") and ($item/following-sibling::item[3]/a[4]/text()="P")) then (
concat("NOM-PREP-NOM-PREP : ",$item/a[2]/text()," ",$item/following-sibling::item[1]/a[2]/text()," ",$item/following-sibling::item[2]/a[2]/text()," ",$item/following-sibling::item[3]/a[2]/text())
)
else if (($item/a[4]/text()="NC") and ($item/following-sibling::item[1]/a[4]/text()="ADJ")) then (
concat("NOM-ADJ : ",$item/a[2]/text()," ",$item/following-sibling::item[1]/a[2]/text())
)
else if (($item/a[4]/text()="ADJ") and ($item/following-sibling::item[1]/a[4]/text()="NC")) then (
concat("ADJ-NOM : ",$item/a[2]/text()," ",$item/following-sibling::item[1]/a[2]/text())
)
else if (($item/a[4]/text()="V") and ($item/following-sibling::item[1]/a[4]/text()="DET") and ($item/following-sibling::item[2]/a[4]/text()="NC")) then (
concat("VERBE-DET-NOM : ",$item/a[2]/text()," ",$item/following-sibling::item[1]/a[2]/text()," ",$item/following-sibling::item[2]/a[2]/text())
)
else (
" "
)
where $conc2 != " "
group by $g:= $conc2
order by count($conc2) descending
return concat(string-join(($g,count($conc2)), "	"),"
")
|