Rev 539 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
539 | bpr | 1 | #! /bin/sh |
14891 | bpr | 2 | LL="env LC_ALL=C LC_CTYPE=C LANG=C" |
539 | bpr | 3 | dicsort_separator=':' |
4 | w_dictionary=dic/syno |
||
5 | w_suffix_dictionary=dic/suffix |
||
6 | w_translator_unknown=leave |
||
7 | export dicsort_separator w_dictionary w_suffix_dictionary w_translator_unknown |
||
8 | export wims_exec_parm dicsort_grouping |
||
9 | |||
10 | echo >dic/form |
||
11 | cnt=0 |
||
12 | for i in `find form -name '*.def'` |
||
13 | do |
||
14 | base=`echo $i | sed 's/\.def$//;s!^form/!!'` |
||
15 | index=`echo $base | tr / @` |
||
16 | # if [ ! -f index/$index ] || [ index/$index -ot $i ]; then |
||
17 | get=`awk 'BEGIN {a=0}; |
||
18 | substr($1,1,1)==":" {if(a==0) a=1; else exit;} |
||
19 | a==1 {print}' $i | |
||
14891 | bpr | 20 | $LL tr 'çéèêëúùûüáàâäãóòôöõíìïîñýÇÉÈÊËÚÙÛÜÁÀÂÃÄÓÒÔÖÕÍÌÏÎÑÝ' 'ceeeeuuuuaaaaaoooooiiiinyCEEEEUUUUAAAAAOOOOOIIIINY' | |
21 | $LL tr "\:[A-Z]\-\012\'" " [a-z] , " | sed 's/,/, /g' | tr -s '[:blank:]' ' '` |
||
539 | bpr | 22 | wims_exec_parm="$get" |
23 | got=`exec dic/translator | tr , '\012' | sed 's/^ //' | sort | uniq` |
||
24 | echo "$got" | awk '{print $0":'$base'"}' >>dic/form |
||
25 | # echo "$got" | awk '{print $0":'$base'"}' >index/$index |
||
26 | # fi |
||
27 | # cat index/$index >>dic/form |
||
28 | echo $base |
||
29 | cnt=$(($cnt+1)) |
||
30 | done |
||
31 | echo $cnt forms. |
||
32 | |||
33 | dicsort_grouping=" " |
||
34 | dic/dicsort dic/form |
||
35 | mv dic/form.sorted dic/form |
||
36 |