Subversion Repositories wimsdev

Rev

Rev 4349 | 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 ;Bernadette,Perrin-Riou
20 reyssat 6
slib_example= mordre
7
!exit
8
 
9
:proc
3027 bpr 10
slib_pr=!word 1 of $wims_read_parm
11
!if $slib_pr=se
12
  slib_type=pr1
13
  slib_inf=!word 2 of $wims_read_parm
14
!else
15
  slib_inf=!word 1 of $wims_read_parm
16
  !if  __s' isin __$slib_inf
17
    slib_inf=!replace internal __s' by in __$slib_inf
18
    slib_type=pr2
19
  !endif
20
!endif
21
 
20 reyssat 22
slib_out=
23
!if $slib_inf=$empty
24
 !exit
25
!endif
26
 
27
slib_i=!text reverse $slib_inf
28
slib_t=!char 1 of $slib_i
29
slib_n=!charcnt $slib_i
30
slib_i=!text expand $slib_i using 10
31
slib_i=$slib_t$slib_i
32
dictionary=bases/dic/fr/conj
33
slib_t=!exec translator $slib_i aa
34
!if | notin $slib_t
35
 !exit
36
!endif
37
slib_t=!translate internal | to $\
38
$ in $slib_t
39
slib_t=!line 1 of $slib_t
40
slib_t=!nospace $slib_t
41
slib_t=!translate internal ; to $\
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
44
slib_m=!charcnt $slib_1
45
slib_r=!char 1 to $slib_n-$slib_m of $slib_inf
46
!if , notin $slib_5
47
 !distribute item $slib_5 into slib_5a,slib_5b,slib_5c
48
 !default slib_5a=!item 2 of $slib_2
49
 !default slib_5b=!item 4 of $slib_2
50
 !default slib_5c=!item 5 of $slib_2
51
 slib_5=$slib_5a,$slib_5b,$slib_5c
52
!endif
53
!for slib_k=2 to 10
54
 slib_$slib_k=!replace internal , by ,$slib_r in $slib_r$(slib_$slib_k)
55
!next slib_k
3027 bpr 56
 
20 reyssat 57
slib_s3=ais,ais,ait,ions,iez,aient
58
slib_s4=rai,ras,ra,rons,rez,ront
59
slib_s5=rais,rais,rait,rions,riez,raient
60
slib_s7=e,es,e,ions,iez,ent
61
slib_s8=sse,sses,t,ssions,ssiez,ssent
62
!if , notin $slib_4
63
 slib_4b=!replace internal , by ,$slib_4 in $slib_4$slib_s5
64
!endif
65
!for slib_k in 3,4,7
66
 !if , notin $(slib_$slib_k)
67
  slib_$slib_k=!replace internal , by ,$(slib_$slib_k) in $(slib_$slib_k)$(slib_s$slib_k)
68
 !endif
69
!next slib_k
70
!if , notin $slib_6
71
 slib_c=!char -1 of $slib_6
72
 slib_c=!translate internal aieou to âîêôû in $slib_c
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
75
!endif
76
!if , notin $slib_8
77
 slib_c=!char -1 of $slib_8
78
 slib_c=!translate internal aieou to âîêôû in $slib_c
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
81
!endif
82
!if , notin $slib_9
83
 slib_c=!char -1 of $slib_9
84
 !if $slib_c notin s
85
  slib_9=$slib_9,$(slib_9)e,$(slib_9)s,$(slib_9)es
86
 !else
87
  slib_9=$slib_9,$(slib_9)e,$slib_9,$(slib_9)es
88
 !endif
89
!endif
90
 
91
slib_out=$slib_2\
92
$slib_3\
93
$slib_4\
94
$slib_4b\
95
$slib_5\
96
$slib_6\
97
$slib_7\
98
$slib_8\
99
$slib_9\
100
$slib_10
101
 
102
!if $slib_1=er
103
 slib_c1=!char -1 of $slib_r
104
 slib_c2=!char -2 of $slib_r
105
 slib_c3=!char -3 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
108
  slib_ra=!replace char number -3 by è in $slib_r
109
  slib_c2=$slib_c3
110
  !goto repl
111
 !endif
112
 !if ($slib_c2 isin eé and $slib_c1 isin bcdfghjklmnpqrstvwxz) or \
113
	($slib_c2=é and $slib_c1=y)
114
  slib_ra=!replace char number -2 by è in $slib_r
115
  :repl
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
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)
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
134
 !endif
135
!endif
136
 
3027 bpr 137
!if pr isin $slib_type
138
  !if $slib_type=pr1
139
    slib_pref=me,te,se,nous,vous,se
140
  !else
141
    slib_pref=m',t',s',nous $ $ $,vous $ $ $ $,s'
142
  !endif
143
  !for slib_k in 1,2, 3, 4, 6, 7, 8
144
   slib_pre=!line $slib_k of $slib_out
145
   slib_pre1=
146
   !for slib_j_=1 to 6
147
    slib_prefi=!item $(slib_j_) of $slib_pref
148
    !if $slib_j_ iswordof 4 5 or $slib_type=pr1
149
      slib_sep=$ $
150
    !else
151
      slib_sep=
152
    !endif
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
155
   !next
156
  !next
157
 !!imperatif
158
  slib_pre=!line 5 of $slib_out
159
   slib_pre1=
160
   slib_pref=-toi,-nous,-vous
161
   !for slib_j_=1 to 3
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
164
   !next
165
 !!participe present
166
  slib_pre=!line 10 of $slib_out
167
  !if $slib_type=pr1
168
    slib_pre1=se $slib_pre
169
  !else
170
    slib_pre1=s'$slib_pre
171
  !endif
172
   slib_out=!replace line number 10 by $(slib_pre1) in $slib_out
173
!endif