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