#!/bin/sh
unset LANG LC_CTYPE LC_ALL LC_COLLATE
make
echo -n "Noun stems: "
grep " " wolig.dat | grep -vc "^#"
echo -n "Adjective stems: "
grep " " wolig.dat | grep -vc "^#"
echo -n "Verb rules: "
grep " " woo.dat | grep -vc "^#"
echo -n "Verb stems: "
grep -c -- "----" out.verbs
echo -n "Shmot Peula derived from verbs: "
wc -l shemp.dat
echo -n Sum of unique nouns and shmot peula:
grep -h " " wolig.dat shemp.dat | grep -v "^#"| sed "s/ *#.*$//" | sort -u | wc -l
echo -n "...out of them: needing no inflection hints: "
grep -h " " wolig.dat shemp.dat | grep -v "^#"| sed "s/ *#.*$//" | sort -u | grep "$" | wc -l
echo -n "                needing explicit gender hints: "
egrep ",(|)" wolig.dat | grep ","| wc -l
echo -n Extrawords, milot and biza-*:
grep -h "^[-]*" extrawords milot biza-verbs biza-nouns | tr -d - | sort -u | wc -l
# NOTE: to find duplicates in wolig.dat:
# grep " " wolig.dat | grep -v "^#"| sed "s/ *#.*$//"|sort |uniq -c | sort -n | less
wc -l milot likelyerrors biza-verbs biza-nouns extrawords
echo
echo -n "Total resulting words: "
(cat out.nouns out.nouns-shemp out.verbs milot extrawords biza-verbs biza-nouns) | grep -h "^[LB-]" | tr -d -| sort -u |wc -l
