Debian Codegraph @

hunspell/scripts/test.sh

raw
1 if [ -z $(which hunspell) ]; then
2 echo 'Please, install Hunspell with sudo apt-get install hunspell'
3 exit 1
4 fi
5
6 echo Pre
7 wc -l *.txt
8
9 hunspell -d ../nl -l -1 ../elements/stress.tsv > stress-hunspell-failed.txt
10 hunspell -d ../nl -G -1 ../elements/excluded.tsv > excluded-hunspell-failed.txt
11 hunspell -d ../nl -l -1 ../../opentaal-wordlist/elements/wordparts.tsv > wordparts-hunspell-failed.txt
12 hunspell -d ../nl -G -1 ../../opentaal-wordlist/elements/corrections.tsv > corrections-hunspell-failed.txt
13 sort ../../opentaal-wordlist/wordlist.txt > tmp1
14 awk -F '\t' '{print $1}' ../elements/excluded.tsv | sort > tmp2
15 /usr/bin/diff tmp1 tmp2 | /bin/grep \< | sed -e 's/^..//' > tmp3
16 hunspell -d ../nl -L tmp3 > wordlist-hunspell-failed.txt
17 rm -f tmp?
18
19 if [ -z $(which nuspell) ]; then
20 echo 'Please, install Nuspell (from their PPA) with sudo apt-get install nuspell'
21 fi
22
23 awk -F '\t' '{print $1}' ../elements/stress.tsv > tmp && nuspell -d ../nl -l tmp > stress-nuspell-failed.txt 2> /dev/null
24 awk -F '\t' '{print $1}' ../elements/excluded.tsv > tmp && nuspell -d ../nl -G tmp > excluded-nuspell-failed.txt 2> /dev/null
25 #awk -F '\t' '{print $1}' ../../opentaal-wordlist/elements/wordparts.tsv > tmp && nuspell -d ../nl -L tmp > wordparts-nuspell-failed.txt 2> /dev/null
26 #awk -F '\t' '{print $1}' ../../opentaal-wordlist/elements/corrections.tsv > tmp && nuspell -d ../nl -G tmp > corrections-nuspell-failed.txt 2> /dev/null
27 #nuspell -d ../nl -l ../../opentaal-wordlist/wordlist.txt > wordlist-nuspell-failed.txt 2> /dev/null
28 rm -f tmp
29
30 echo Post
31 wc -l *.txt