Subversion Repositories wimsdev

Rev

Rev 7692 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7692 Rev 13585
Line 1... Line 1...
1
!if $wims_read_parm!=slib_header
1
!if $wims_read_parm!=slib_header
2
 !goto proc
2
  !goto proc
3
!endif
3
!endif
4
 
4
 
5
slib_author=Gang, XIAO ;Bernadette,Perrin-Riou
5
slib_author=Gang, XIAO ;Bernadette,Perrin-Riou
6
slib_example= mordre
6
slib_example= mordre
7
!exit
7
!exit
Line 19... Line 19...
19
  !endif
19
  !endif
20
!endif
20
!endif
21
 
21
 
22
slib_out=
22
slib_out=
23
!if $slib_inf=$empty
23
!if $slib_inf=$empty
24
 !exit
24
  !exit
25
!endif
25
!endif
26
 
26
 
27
slib_i=!text reverse $slib_inf
27
slib_i=!text reverse $slib_inf
28
slib_t=!char 1 of $slib_i
28
slib_t=!char 1 of $slib_i
29
slib_n=!charcnt $slib_i
29
slib_n=!charcnt $slib_i
30
slib_i=!text expand $slib_i using 10
30
slib_i=!text expand $slib_i using 10
31
slib_i=$slib_t$slib_i
31
slib_i=$slib_t$slib_i
32
dictionary=bases/dic/fr/conj
32
dictionary=bases/dic/fr/conj
33
slib_t=!exec translator $slib_i aa
33
slib_t=!exec translator $slib_i aa
34
!if | notin $slib_t
34
!if | notin $slib_t
35
 !exit
35
  !exit
36
!endif
36
!endif
37
slib_t=!translate internal | to $\
37
slib_t=!translate internal | to $\
38
$ in $slib_t
38
$ in $slib_t
39
slib_t=!line 1 of $slib_t
39
slib_t=!line 1 of $slib_t
40
slib_t=!nospace $slib_t
40
slib_t=!nospace $slib_t
Line 42... Line 42...
42
$ in $slib_t
42
$ in $slib_t
43
!distribute lines $slib_t into slib_1,slib_2,slib_3,slib_4,slib_5,slib_6,slib_7,slib_8,slib_9,slib_10
43
!distribute lines $slib_t into slib_1,slib_2,slib_3,slib_4,slib_5,slib_6,slib_7,slib_8,slib_9,slib_10
44
slib_m=!charcnt $slib_1
44
slib_m=!charcnt $slib_1
45
slib_r=!char 1 to $slib_n-$slib_m of $slib_inf
45
slib_r=!char 1 to $slib_n-$slib_m of $slib_inf
46
!if , notin $slib_5
46
!if , notin $slib_5
47
 !distribute item $slib_5 into slib_5a,slib_5b,slib_5c
47
  !distribute item $slib_5 into slib_5a,slib_5b,slib_5c
48
 !default slib_5a=!item 2 of $slib_2
48
  !default slib_5a=!item 2 of $slib_2
49
 !default slib_5b=!item 4 of $slib_2
49
  !default slib_5b=!item 4 of $slib_2
50
 !default slib_5c=!item 5 of $slib_2
50
  !default slib_5c=!item 5 of $slib_2
51
 slib_5=$slib_5a,$slib_5b,$slib_5c
51
  slib_5=$slib_5a,$slib_5b,$slib_5c
52
!endif
52
!endif
53
!for slib_k=2 to 10
53
!for slib_k=2 to 10
54
 slib_$slib_k=!replace internal , by ,$slib_r in $slib_r$(slib_$slib_k)
54
  slib_$slib_k=!replace internal , by ,$slib_r in $slib_r$(slib_$slib_k)
55
!next slib_k
55
!next slib_k
56
 
56
 
57
slib_s3=ais,ais,ait,ions,iez,aient
57
slib_s3=ais,ais,ait,ions,iez,aient
58
slib_s4=rai,ras,ra,rons,rez,ront
58
slib_s4=rai,ras,ra,rons,rez,ront
59
slib_s5=rais,rais,rait,rions,riez,raient
59
slib_s5=rais,rais,rait,rions,riez,raient
Line 61... Line 61...
61
slib_s8=sse,sses,t,ssions,ssiez,ssent
61
slib_s8=sse,sses,t,ssions,ssiez,ssent
62
!if , notin $slib_4
62
!if , notin $slib_4
63
 slib_4b=!replace internal , by ,$slib_4 in $slib_4$slib_s5
63
 slib_4b=!replace internal , by ,$slib_4 in $slib_4$slib_s5
64
!endif
64
!endif
65
!for slib_k in 3,4,7
65
!for slib_k in 3,4,7
66
 !if , notin $(slib_$slib_k)
66
  !if , notin $(slib_$slib_k)
67
  slib_$slib_k=!replace internal , by ,$(slib_$slib_k) in $(slib_$slib_k)$(slib_s$slib_k)
67
    slib_$slib_k=!replace internal , by ,$(slib_$slib_k) in $(slib_$slib_k)$(slib_s$slib_k)
68
 !endif
68
  !endif
69
!next slib_k
69
!next slib_k
70
!if , notin $slib_6
70
!if , notin $slib_6
71
 slib_c=!char -1 of $slib_6
71
  slib_c=!char -1 of $slib_6
72
 slib_c=!translate internal aieou to âîêôû in $slib_c
72
  slib_c=!translate internal aieou to âîêôû in $slib_c
73
 slib_c=!replace char number -1 by $slib_c in $slib_6
73
  slib_c=!replace char number -1 by $slib_c in $slib_6
74
 slib_6=$(slib_6)s,$(slib_6)s,$(slib_6)t,$(slib_c)mes,$(slib_c)tes,$(slib_6)rent
74
  slib_6=$(slib_6)s,$(slib_6)s,$(slib_6)t,$(slib_c)mes,$(slib_c)tes,$(slib_6)rent
75
!endif
75
!endif
76
!if , notin $slib_8
76
!if , notin $slib_8
77
 slib_c=!char -1 of $slib_8
77
  slib_c=!char -1 of $slib_8
78
 slib_c=!translate internal aieou to âîêôû in $slib_c
78
  slib_c=!translate internal aieou to âîêôû in $slib_c
79
 slib_c=!replace char number -1 by $slib_c in $slib_8
79
  slib_c=!replace char number -1 by $slib_c in $slib_8
80
 slib_8=$(slib_8)sse,$(slib_8)sses,$(slib_c)t,$(slib_8)ssions,$(slib_8)ssiez,$(slib_8)ssent
80
  slib_8=$(slib_8)sse,$(slib_8)sses,$(slib_c)t,$(slib_8)ssions,$(slib_8)ssiez,$(slib_8)ssent
81
!endif
81
!endif
82
!if , notin $slib_9
82
!if , notin $slib_9
83
 slib_c=!char -1 of $slib_9
83
  slib_c=!char -1 of $slib_9
84
 !if $slib_c notin s
84
  !if $slib_c notin s
85
  slib_9=$slib_9,$(slib_9)e,$(slib_9)s,$(slib_9)es
85
    slib_9=$slib_9,$(slib_9)e,$(slib_9)s,$(slib_9)es
86
 !else
86
  !else
87
  slib_9=$slib_9,$(slib_9)e,$slib_9,$(slib_9)es
87
    slib_9=$slib_9,$(slib_9)e,$slib_9,$(slib_9)es
88
 !endif
88
  !endif
89
!endif
89
!endif
90
 
90
 
91
slib_out=$slib_2\
91
slib_out=$slib_2\
92
$slib_3\
92
$slib_3\
93
$slib_4\
93
$slib_4\
Line 98... Line 98...
98
$slib_8\
98
$slib_8\
99
$slib_9\
99
$slib_9\
100
$slib_10
100
$slib_10
101
 
101
 
102
!if $slib_1=er
102
!if $slib_1=er
103
 slib_c1=!char -1 of $slib_r
103
  slib_c1=!char -1 of $slib_r
104
 slib_c2=!char -2 of $slib_r
104
  slib_c2=!char -2 of $slib_r
105
 slib_c3=!char -3 of $slib_r
105
  slib_c3=!char -3 of $slib_r
106
 slib_c4=!char -2,-1 of $slib_r
106
  slib_c4=!char -2,-1 of $slib_r
107
 !if $slib_c3 isin eé and $slib_c4 iswordof br ch cr gl gn gr gu qu tr vr
107
  !if $slib_c3 isin eé and $slib_c4 iswordof br ch cr gl gn gr gu qu tr vr
108
  slib_ra=!replace char number -3 by è in $slib_r
108
    slib_ra=!replace char number -3 by è in $slib_r
109
  slib_c2=$slib_c3
109
    slib_c2=$slib_c3
110
  !goto repl
110
    !goto repl
111
 !endif
111
  !endif
112
 !if ($slib_c2 isin eé and $slib_c1 isin bcdfghjklmnpqrstvwxz) or \
112
  !if ($slib_c2 isin eé and $slib_c1 isin bcdfghjklmnpqrstvwxz) or \
113
	($slib_c2=é and $slib_c1=y)
113
    ($slib_c2=é and $slib_c1=y)
114
  slib_ra=!replace char number -2 by è in $slib_r
114
    slib_ra=!replace char number -2 by è in $slib_r
115
  :repl
115
    :repl
116
  slib_out=!replace internal $(slib_r)e, by $(slib_ra)e, in $slib_out
116
    slib_out=!replace internal $(slib_r)e, by $(slib_ra)e, in $slib_out
117
  slib_out=!replace internal $(slib_r)en by $(slib_ra)en in $slib_out
117
    slib_out=!replace internal $(slib_r)en by $(slib_ra)en in $slib_out
118
  slib_out=!replace internal $(slib_r)es by $(slib_ra)es in $slib_out
118
    slib_out=!replace internal $(slib_r)es by $(slib_ra)es in $slib_out
119
  !if $slib_c2=e and ($slib_c1 isin lmnstv or $slib_c4=vr)
119
    !if $slib_c2=e and ($slib_c1 isin lmnstv or $slib_c4=vr)
120
   slib_out=!replace internal $(slib_r)er by $(slib_ra)er in $slib_out
120
      slib_out=!replace internal $(slib_r)er by $(slib_ra)er in $slib_out
-
 
121
    !endif
-
 
122
  !endif
-
 
123
  !if $slib_c1=c
-
 
124
    slib_ra=!replace char number -1 by ç in $slib_r
-
 
125
    !for slib_c in a,o,â
-
 
126
      slib_out=!replace internal $(slib_r)$slib_c by $(slib_ra)$slib_c in $slib_out
-
 
127
    !next slib_c
-
 
128
  !endif
-
 
129
  !if $slib_c1=g
-
 
130
    slib_ra=$(slib_r)e
-
 
131
    !for slib_c in a,o,â
-
 
132
      slib_out=!replace internal $(slib_r)$slib_c by $(slib_ra)$slib_c in $slib_out
-
 
133
    !next slib_c
121
  !endif
134
  !endif
122
 !endif
-
 
123
 !if $slib_c1=c
-
 
124
  slib_ra=!replace char number -1 by ç in $slib_r
-
 
125
  !for slib_c in a,o,â
-
 
126
   slib_out=!replace internal $(slib_r)$slib_c by $(slib_ra)$slib_c in $slib_out
-
 
127
  !next slib_c
-
 
128
 !endif
-
 
129
 !if $slib_c1=g
-
 
130
  slib_ra=$(slib_r)e
-
 
131
  !for slib_c in a,o,â
-
 
132
   slib_out=!replace internal $(slib_r)$slib_c by $(slib_ra)$slib_c in $slib_out
-
 
133
  !next slib_c
-
 
134
 !endif
-
 
135
!endif
135
!endif
136
 
136
 
137
!if pr isin $slib_type
137
!if pr isin $slib_type
138
  !if $slib_type=pr1
138
  !if $slib_type=pr1
139
    slib_pref=me,te,se,nous,vous,se
139
    slib_pref=me,te,se,nous,vous,se
140
  !else
140
  !else
141
    slib_pref=m',t',s',nous $ $ $,vous $ $ $ $,s'
141
    slib_pref=m',t',s',nous $ $ $,vous $ $ $ $,s'
142
  !endif
142
  !endif
143
  !for slib_k in 1,2, 3, 4, 6, 7, 8
143
  !for slib_k in 1,2, 3, 4, 6, 7, 8
144
   slib_pre=!line $slib_k of $slib_out
144
    slib_pre=!line $slib_k of $slib_out
145
   slib_pre1=
145
    slib_pre1=
146
   !for slib_j_=1 to 6
146
    !for slib_j_=1 to 6
147
    slib_prefi=!item $(slib_j_) of $slib_pref
147
      slib_prefi=!item $(slib_j_) of $slib_pref
148
    !if $slib_j_ iswordof 4 5 or $slib_type=pr1
148
      !if $slib_j_ iswordof 4 5 or $slib_type=pr1
149
      slib_sep=$ $
149
        slib_sep=$ $
150
    !else
150
      !else
151
      slib_sep=
151
        slib_sep=
152
    !endif
152
      !endif
153
    slib_pre1=!append item $slib_prefi$slib_sep$(slib_pre[$slib_j_]) to $(slib_pre1)
153
      slib_pre1=!append item $slib_prefi$slib_sep$(slib_pre[$slib_j_]) to $(slib_pre1)
154
    slib_out=!replace line number $slib_k by $(slib_pre1) in $slib_out
154
      slib_out=!replace line number $slib_k by $(slib_pre1) in $slib_out
155
   !next
155
    !next
156
  !next
156
  !next
157
 !!imperatif
157
  !!imperatif
158
  slib_pre=!line 5 of $slib_out
158
  slib_pre=!line 5 of $slib_out
159
   slib_pre1=
159
  slib_pre1=
160
   slib_pref=-toi,-nous,-vous
160
  slib_pref=-toi,-nous,-vous
161
   !for slib_j_=1 to 3
161
  !for slib_j_=1 to 3
162
    slib_pre1=!append item $(slib_pre[$slib_j_])$(slib_pref[$slib_j_]) to $(slib_pre1)
162
    slib_pre1=!append item $(slib_pre[$slib_j_])$(slib_pref[$slib_j_]) to $(slib_pre1)
163
    slib_out=!replace line number 5 by $(slib_pre1) in $slib_out
163
    slib_out=!replace line number 5 by $(slib_pre1) in $slib_out
164
   !next
164
  !next
165
 !!participe present
165
  !!participe present
166
  slib_pre=!line 10 of $slib_out
166
  slib_pre=!line 10 of $slib_out
167
  !if $slib_type=pr1
167
  !if $slib_type=pr1
168
    slib_pre1=se $slib_pre
168
    slib_pre1=se $slib_pre
169
  !else
169
  !else
170
    slib_pre1=s'$slib_pre
170
    slib_pre1=s'$slib_pre
171
  !endif
171
  !endif
172
   slib_out=!replace line number 10 by $(slib_pre1) in $slib_out
172
  slib_out=!replace line number 10 by $(slib_pre1) in $slib_out
173
!endif
173
!endif