| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # test spell checking and suggestions |
| 3 | HUNSPELL_PROGRAM=${HUNSPELL:-hunspell} |
| 4 | # Syntax for words: |
| 5 | # <good> <*bad> <*bad:requested_suggestion> <*bad:*bad_suggestion> |
| 6 | echoscip-shell system . . echo. "=== REJECTED GOOD WORDS ===" |
| 7 | catscip-shell system . . cat. aff/* teszt/* szotar/kivetelek/ragozatlan/* szotar/*/*.* | grepscip-shell system . . grep. -o '<[^ *>]*>' | grepscip-shell system . . grep. -v '[@/]' | trscip-shell system . . tr. -d '>' | trscip-shell system . . tr. '<' '\n' | awkscip-shell system . . awk. '{print$0"\t"}' | $HUNSPELL_PROGRAM -1 -l -d hu_HU_u8_gen_alias |
| 8 | echoscip-shell system . . echo. "=== ACCEPTED BAD WORDS ===" |
| 9 | catscip-shell system . . cat. aff/* teszt/* szotar/kivetelek/ragozatlan/* szotar/*/*.* | grepscip-shell system . . grep. -o '<\*[^ :>]*\(:[^:>]*\)\?>' | grepscip-shell system . . grep. -v '[@/]' | trscip-shell system . . tr. -d '>*' | trscip-shell system . . tr. '<' '\n' | sedscip-shell system . . sed. 's/:.*//' | awkscip-shell system . . awk. '{print$0"\t"}' | $HUNSPELL_PROGRAM -1 -l -G -d hu_HU_u8_gen_alias |
| 10 | echoscip-shell system . . echo. "=== MISSING SUGGESTIONS ===" |
| 11 | rmscip-shell system . . rm. /tmp/mi_checkscip-shell filesystem . . `/tmp/mi_check`. |
| 12 | catscip-shell system . . cat. aff/* teszt/* szotar/kivetelek/ragozatlan/* szotar/*/*.* | grepscip-shell system . . grep. -o '<\*[^ :>]*:[^:>]*>' | grepscip-shell system . . grep. -v '[@/]' | trscip-shell system . . tr. -d '>*' | trscip-shell system . . tr. ':<' '\t\n' | teescip-shell system . . tee. /tmp/mi_checkscip-shell filesystem . . `/tmp/mi_check`. >/tmp/miscip-shell filesystem . . `/tmp/mi`. |
| 13 | catscip-shell system . . cat. /tmp/miscip-shell filesystem . . `/tmp/mi`. | $HUNSPELL_PROGRAM -1 -d hu_HU_u8_gen_alias | awkscip-shell system . . awk. ' |
| 14 | FILENAME != "-" { FS="\t"; a[$1]=$2;next } |
| 15 | {FS=" "} |
| 16 | {na1=a[$2]","; na2=a[$2]"$"} |
| 17 | $1=="#" || ($1=="&" && !($0~na1 || $0~na2)) { |
| 18 | print $2"->"a[$2]"? (" $0 ")" |
| 19 | } |
| 20 | {next}' /tmp/mi_checkscip-shell filesystem . . `/tmp/mi_check`. - |