mmcarpi commited on
Commit
0b63932
1 Parent(s): c2a212a

docs & sizes: Compute number of documents and size in each taxonomy

Browse files
Files changed (2) hide show
  1. corpus/docs.sh +7 -0
  2. corpus/sizes.sh +7 -0
corpus/docs.sh ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/bash
2
+ for file in ./*; do
3
+ if [ -d $file ]; then
4
+ NCHARS=$(find $file -name '*.xml.gz' -exec bash -c 'gzip -d -c {} | grep -c "<TEI>"' \; | awk 'BEGIN { a = 0 }; { a+=$1}; END { print a }')
5
+ printf '%-20s %s\n' $file $NCHARS
6
+ fi
7
+ done
corpus/sizes.sh ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/bash
2
+ for file in ./*; do
3
+ if [ -d $file ]; then
4
+ NCHARS=$(find $file -name '*.xml.gz' -exec bash -c 'gzip -d -c {} | wc -c' \; | awk 'BEGIN { a = 0 }; { a+=$1}; END { print a }')
5
+ printf '%-20s %s\n' $file $NCHARS | numfmt --to=iec --field=2
6
+ fi
7
+ done