collect.sh: bugfix pubdate
This commit is contained in:
15
collect.sh
15
collect.sh
@@ -48,9 +48,19 @@ do
|
||||
|
||||
# tellingen met tags
|
||||
|
||||
# pubdate soms kan verschillen voor hetzelfde bericht,
|
||||
# bijvoorbeeld wanneer een oude versie op zaterdag is verschenen
|
||||
# en een bijgewerkte versie op maandag. Dan valt de nieuwe versie in
|
||||
# een volgende week (en dus directory) dan de oude versie, en wordt het
|
||||
# bericht dus opieuw opgeslagen.
|
||||
# Daarom moet pubdate verwijderd worden uit de metadata, om dubbele
|
||||
# tellingen te voorkomen.
|
||||
# Dit speelt alleen(?) bij atom-feeds, zoals van de VRT.
|
||||
|
||||
alto \
|
||||
'fp://node[((@cat="mwu" and node[@pt="spec"]) or (@pt and @*="eigen" and not(@rel="mwp"))) and not(@his="normal") and not(@his_1="decap" or @his_1="0")]' \
|
||||
'tt:%w\t%d\t%I' $files \
|
||||
| sed -e 's/pubdate: "[-0-9]*"//' \
|
||||
| sed -e 's/\.[0-9][0-9]*$//' | sort | uniq \
|
||||
| items2count > $part-nieuwe-namen-$ds-$i
|
||||
top20 $part-nieuwe-namen-$ds-$i
|
||||
@@ -58,6 +68,7 @@ do
|
||||
alto \
|
||||
'fp://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")]' \
|
||||
'tt:%w\t%d\t%I' $files \
|
||||
| sed -e 's/pubdate: "[-0-9]*"//' \
|
||||
| sed -e 's/\.[0-9][0-9]*$//' | sort | uniq \
|
||||
| items2count > $part-nieuwe-woorden-$ds-$i
|
||||
top20 $part-nieuwe-woorden-$ds-$i
|
||||
@@ -65,24 +76,28 @@ do
|
||||
alto \
|
||||
'fp://node[(@neclass="LOC" and not(@rel="mwp")) or (@cat="mwu" and node[@pt="spec" and @neclass="LOC"])]' \
|
||||
'tt:%l\t%d\t%I' $files \
|
||||
| sed -e 's/pubdate: "[-0-9]*"//' \
|
||||
| sed -e 's/\.[0-9][0-9]*$//' | sort | uniq \
|
||||
| items2count > $part-locaties-$ds-$i
|
||||
|
||||
alto \
|
||||
'fp://node[(@neclass="PER" and not(@rel="mwp")) or (@cat="mwu" and node[@pt="spec" and @neclass="PER"])]' \
|
||||
'tt:%l\t%d\t%I' $files \
|
||||
| sed -e 's/pubdate: "[-0-9]*"//' \
|
||||
| sed -e 's/\.[0-9][0-9]*$//' | sort | uniq \
|
||||
| items2count > $part-personen-$ds-$i
|
||||
|
||||
alto \
|
||||
'fp://node[(@neclass="ORG" and not(@rel="mwp")) or (@cat="mwu" and node[@pt="spec" and @neclass="ORG"])]' \
|
||||
'tt:%l\t%d\t%I' $files \
|
||||
| sed -e 's/pubdate: "[-0-9]*"//' \
|
||||
| sed -e 's/\.[0-9][0-9]*$//' | sort | uniq \
|
||||
| items2count > $part-organisaties-$ds-$i
|
||||
|
||||
alto \
|
||||
'fp://node[(@neclass="MISC" and not(@rel="mwp")) or (@cat="mwu" and node[@pt="spec" and @neclass="MISC"])]' \
|
||||
'tt:%l\t%d\t%I' $files \
|
||||
| sed -e 's/pubdate: "[-0-9]*"//' \
|
||||
| sed -e 's/\.[0-9][0-9]*$//' | sort | uniq \
|
||||
| items2count > $part-overige-namen-$ds-$i
|
||||
|
||||
|
||||
Reference in New Issue
Block a user