Rev 10937 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !if $wims_read_parm!=slib_header |
13585 | bpr | 2 | !goto proc |
20 | reyssat | 3 | !endif |
4158 | bpr | 4 | |
4349 | bpr | 5 | slib_author=Gang, XIAO |
4158 | bpr | 6 | |
7 | slib_example= le avion\ |
||
20 | reyssat | 8 | le port\ |
8820 | bpr | 9 | de le pain\ |
10 | de huit |
||
20 | reyssat | 11 | !exit |
12 | |||
13 | :proc |
||
14 | slib_inp=!singlespace $wims_read_parm |
||
15 | slib_out= |
||
16 | !if $slib_inp=$empty |
||
17 | !exit |
||
18 | !endif |
||
10937 | bpr | 19 | slib_haspire=huit haricot |
20 | reyssat | 20 | |
21 | slib_n=!wordcnt $slib_inp |
||
22 | !for slib_i=1 to $slib_n-1 |
||
13585 | bpr | 23 | slib_W=!word $slib_i of $slib_inp |
24 | slib_w=!lower $slib_W |
||
25 | slib_c=!char -1 of $slib_W |
||
26 | !if $slib_c notin ea or $slib_w notwordof \ |
||
27 | ce de je la le ma me ne sa se ta te que puisque lorsque |
||
8820 | bpr | 28 | !goto normal |
13585 | bpr | 29 | !endif |
30 | slib_n=!word $slib_i+1 of $slib_inp |
||
31 | slib_cn=!char 1 of $slib_n |
||
32 | slib_cn=!lower $slib_cn |
||
33 | slib_cn=!deaccent $slib_cn |
||
34 | !if $slib_cn notin aeiouh |
||
35 | !goto normal |
||
36 | !endif |
||
37 | !if $slib_cn=h and $slib_n iswordof $slib_haspire |
||
38 | !goto normal |
||
39 | !endif |
||
40 | !if $slib_w=ce |
||
41 | slib_out=$(slib_out)cet $ |
||
42 | !goto next |
||
43 | !endif |
||
44 | !if $slib_c=e or $slib_w=la |
||
45 | slib_W1=!char 1 to -2 of $slib_W |
||
46 | slib_out=$slib_out$slib_W1' |
||
47 | !else |
||
48 | slib_c1=!char 1 of $slib_W |
||
49 | slib_out=$slib_out$(slib_c1)on $ |
||
50 | !endif |
||
20 | reyssat | 51 | !goto next |
13585 | bpr | 52 | :normal |
53 | slib_out=$slib_out$slib_W $ |
||
54 | :next |
||
20 | reyssat | 55 | !next slib_i |
56 | slib_w=!word -1 of $slib_inp |
||
57 | slib_out=!trim $slib_out$slib_w |
||
58 | slib_out=!replace word de le by du in $slib_out |
||
59 | slib_out=!replace word à le by au in $slib_out |
||
60 | slib_out=!replace word de les by des in $slib_out |
||
61 | slib_out=!replace word à les by aux in $slib_out |