-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestnoun.sh
executable file
·14 lines (12 loc) · 1.82 KB
/
testnoun.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
# Dette skriptet tester at nesten alle lemmaene i noun-sjd-lex.txt kan genereres. De som ikke kan genereres, kopieres til missingnounLemmas.txt
grep ";" noun-sjd-lex.txt | grep -v "^\!" | egrep -v '(CmpN/Only|+Gen+|+Loc+|CmpN/Last)' | sed 's/% /€/g' | sed 's/%:/¢/g' | tr ":+" " " | cut -d " " -f1 | tr -d "#%" | tr "€" " " | tr "¢" ":" | sort -u > nouns
cat nouns | sed 's/$/+N+Sg+Nom/' | $LOOKUP $GTHOME/gt/sjd/bin/isjd.fst | cut -f2 | grep -v "N+" | grep -v "^$" | sort -u > analnouns
cat nouns | sed 's/$/+N+Sg+Nom/' | $LOOKUP $GTHOME/gt/sjd/bin/isjd.fst | cut -f2 | grep "N+" | cut -d "+" -f1 | sed 's/$/+N+Pl+Nom/' | $LOOKUP $GTHOME/gt/sjd/bin/isjd.fst | cut -f2 | grep -v "^$" >> analnouns
grep ";" noun-sjd-lex.txt | grep -v "^\!" | egrep "( R | Rreal | Rnoun)" | cut -d ":" -f1 | sed 's/+Use\/Sub//' | sed 's/CmpN\/SgN$/Cmp#viessu+N+Sg+Nom/' | sed 's/CmpN\/SgG$/Cmp#viessu+N+Sg+Nom/' | sed 's/CmpN\/PlG$/Cmp#viessu+N+Sg+Nom/' | $LOOKUP $GTHOME/gt/sjd/bin/isjd.fst | cut -f2 | grep "\-" | grep -v "\-.*\-" | cut -d "-" -f1 >> analnouns
grep ";" noun-sjd-lex.txt | grep -v "^\!" | egrep "( R | Rreal | Rnoun)" | cut -d ":" -f1 | sed 's/+Use\/Sub//' | sed 's/CmpN\/SgN$/Cmp#viessu+N+Sg+Nom/' | sed 's/CmpN\/SgG$/Cmp#viessu+N+Sg+Nom/' | sed 's/CmpN\/PlG$/Cmp#viessu+N+Sg+Nom/' | $LOOKUP $GTHOME/gt/sjd/bin/isjd.fst | cut -f2 | grep "\-" | grep "\-.*\-" | cut -d "-" -f1,2 >> analnouns
grep ";" noun-sjd-lex.txt | grep -v "^\!" | grep "RHyph" | cut -d ":" -f1 | sed 's/+Use\/Sub//' | sed 's/CmpN\/SgN$/Cmp-#viessu+N+Sg+Nom/' | sed 's/CmpN\/SgG$/Cmp-#viessu+N+Sg+Nom/' | sed 's/CmpN\/PlG$/Cmp-#viessu+N+Sg+Nom/' | $LOOKUP $GTHOME/gt/sjd/bin/isjd.fst | cut -f2 | grep "\-" | cut -d "-" -f1 >> analnouns
sort -u -o nouns nouns
sort -u -o analnouns analnouns
comm -23 nouns analnouns > missingnounLemmas.txt
rm *nouns
open missingnounLemmas.txt