blob: 07f97455c91a699a8db82709cd7a4eb9a990ac0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
export CITEFILE=enwiki-YYYYMMDD-pages-articles.citations.json.gz
# total number of articles processed
zcat $CITEFILE | wc -l
# articles with one or more refs
zcat $CITEFILE | rg '"CitationClass"' | wc -l
# total number of refs
zcat $CITEFILE | jq '.refs[].CitationClass' -r | wc -l
# refs by type
zcat $CITEFILE | jq '.refs[].CitationClass' -r | sort | uniq -c | sort -nr
# identifiers present
zcat $CITEFILE | jq '.refs[] | select(.ID_list != null) | .ID_list | keys[]' -r | sort | uniq -c | sort -nr
# refs with URL, by type
zcat $CITEFILE | jq '.refs[] | select(.URL != null) | .CitationClass' -r | sort | uniq -c | sort -nr
# refs with ArchiveURL, by type
zcat $CITEFILE | jq '.refs[] | select(.ArchiveURL != null) | .CitationClass' -r | sort | uniq -c | sort -nr
|