Spacing
[apertium.git] / apertium-sh-mk / apertium-sh-mk.mk-sh.t1x
blobdff72a15865e9f3a65b10c6cdc9651647120ed4b
1 <?xml version="1.0" encoding="utf-8"?>
2 <transfer>
4 <section-def-cats>
5 <def-cat n="nom">
6 <cat-item tags="n.*"/>
7 <cat-item tags="np.*"/>
8 </def-cat>
9 <def-cat n="prn">
10 <cat-item tags="prn.*"/>
11 </def-cat>
12 <def-cat n="pr">
13 <cat-item tags="pr"/>
14 </def-cat>
15 <def-cat n="adj">
16 <cat-item tags="adj.*"/>
17 </def-cat>
18 <def-cat n="det">
19 <cat-item tags="det"/>
20 <cat-item tags="det.*"/>
21 </def-cat>
22 </section-def-cats>
24 <section-def-attrs>
25 <def-attr n="a_nom">
26 <attr-item tags="n"/>
27 <attr-item tags="np"/>
28 <attr-item tags="np.ant"/>
29 <attr-item tags="np.top"/>
30 </def-attr>
32 <def-attr n="a_prp">
33 <attr-item tags="pr"/>
34 </def-attr>
36 <def-attr n="a_adj">
37 <attr-item tags="adj"/>
38 </def-attr>
40 <def-attr n="a_prn">
41 <attr-item tags="prn"/>
42 <attr-item tags="prn.itg"/>
43 </def-attr>
45 <def-attr n="gen">
46 <attr-item tags="m"/>
47 <attr-item tags="f"/>
48 <attr-item tags="nt"/>
49 <attr-item tags="mf"/>
50 </def-attr>
52 <def-attr n="prs">
53 <attr-item tags="p1"/>
54 <attr-item tags="p2"/>
55 <attr-item tags="p3"/>
56 </def-attr>
58 <def-attr n="nbr">
59 <attr-item tags="sg"/>
60 <attr-item tags="pl"/>
61 </def-attr>
63 <def-attr n="cas">
64 <attr-item tags="nom"/>
65 <attr-item tags="acc"/>
66 <attr-item tags="dat"/>
67 <attr-item tags="gen"/>
68 <attr-item tags="loc"/>
69 <attr-item tags="ins"/>
70 <attr-item tags="voc"/>
71 </def-attr>
73 </section-def-attrs>
75 <section-def-vars>
76 <def-var n="number"/>
77 <def-var n="genere"/>
78 </section-def-vars>
80 <section-rules>
81 <rule>
82 <pattern>
83 <pattern-item n="nom"/>
84 </pattern>
85 <action>
86 <out>
87 <lu>
88 <clip pos="1" side="tl" part="lem"/>
89 <clip pos="1" side="tl" part="a_nom"/>
90 <clip pos="1" side="tl" part="gen"/>
91 <lit-tag v="nom"/>
92 <clip pos="1" side="tl" part="nbr"/>
93 </lu>
94 </out>
95 </action>
96 </rule>
98 <rule>
99 <pattern>
100 <pattern-item n="adj"/>
101 </pattern>
102 <action>
103 <out>
104 <lu>
105 <clip pos="1" side="tl" part="lem"/>
106 <clip pos="1" side="tl" part="a_adj"/>
107 <clip pos="1" side="tl" part="gen"/>
108 <clip pos="1" side="tl" part="nbr"/>
109 <lit-tag v="nom"/>
110 </lu>
111 </out>
112 </action>
113 </rule>
117 <rule>
118 <pattern>
119 <pattern-item n="prn"/>
120 </pattern>
121 <action>
122 <out>
123 <lu>
124 <clip pos="1" side="tl" part="lem"/>
125 <clip pos="1" side="tl" part="a_prn"/>
126 <clip pos="1" side="tl" part="prs"/>
127 <clip pos="1" side="tl" part="gen"/>
128 <lit-tag v="nom"/>
129 <clip pos="1" side="tl" part="nbr"/>
130 </lu>
131 </out>
132 </action>
133 </rule>
137 <!-- We need to drop determiners, ideally we should do this
138 some other way, or more cleverly work out some way to
139 use them to help decide about cases. -->
140 <rule>
141 <pattern>
142 <pattern-item n="det"/>
143 </pattern>
144 <action>
145 <out>
146 <lu>
147 <lit v=""/>
148 </lu>
149 </out>
150 </action>
151 </rule>
154 <rule>
155 <pattern>
156 <pattern-item n="pr"/>
157 <pattern-item n="nom"/>
158 </pattern>
159 <action>
160 <choose>
161 <!-- When the preposition is "на", and the noun
162 following is an antonym set the case of
163 the following proper noun to the locative
164 and drop the preposition. -->
165 <when>
166 <test>
167 <and>
168 <equal>
169 <clip pos="1" side="sl" part="lem"/>
170 <lit v="на"/>
171 </equal>
172 <equal>
173 <clip pos="2" side="tl" part="a_nom"/>
174 <lit-tag v="np.ant"/>
175 </equal>
176 </and>
177 </test>
178 <out>
179 <lu>
180 <clip pos="2" side="tl" part="lem"/>
181 <clip pos="2" side="tl" part="a_nom"/>
182 <clip pos="2" side="tl" part="gen"/>
183 <lit-tag v="gen"/>
184 </lu>
185 </out>
186 </when>
189 <!-- When the preposition is "o", set the case of the
190 following noun to the locative. -->
191 <when>
192 <test>
193 <equal>
194 <clip pos="1" side="tl" part="lem"/>
195 <lit v="o"/>
196 </equal>
197 </test>
198 <out>
199 <lu>
200 <clip pos="1" side="tl" part="lem"/>
201 <clip pos="1" side="tl" part="a_prp"/>
202 </lu>
203 <b/>
204 <lu>
205 <clip pos="2" side="tl" part="lem"/>
206 <clip pos="2" side="tl" part="a_nom"/>
207 <clip pos="2" side="tl" part="gen"/>
208 <lit-tag v="loc"/>
209 <clip pos="2" side="tl" part="nbr"/>
210 </lu>
211 </out>
212 </when>
214 <!-- When the preposition is "u", set the case of the
215 following noun to the locative. -->
216 <when>
217 <test>
218 <equal>
219 <clip pos="1" side="tl" part="lem"/>
220 <lit v="u"/>
221 </equal>
222 </test>
223 <out>
224 <lu>
225 <clip pos="1" side="tl" part="lem"/>
226 <clip pos="1" side="tl" part="a_prp"/>
227 </lu>
228 <b/>
229 <lu>
230 <clip pos="2" side="tl" part="lem"/>
231 <clip pos="2" side="tl" part="a_nom"/>
232 <clip pos="2" side="tl" part="gen"/>
233 <lit-tag v="loc"/>
234 <clip pos="2" side="tl" part="nbr"/>
235 </lu>
236 </out>
237 </when>
239 <otherwise>
240 <out>
241 <lu>
242 <clip pos="1" side="tl" part="lem"/>
243 <clip pos="1" side="tl" part="a_prp"/>
244 </lu>
245 <b/>
246 <lu>
247 <clip pos="2" side="tl" part="lem"/>
248 <clip pos="2" side="tl" part="a_nom"/>
249 <clip pos="2" side="tl" part="gen"/>
250 <lit-tag v="nom"/>
251 <clip pos="2" side="tl" part="nbr"/>
252 </lu>
253 </out>
254 </otherwise>
255 </choose>
256 </action>
257 </rule>
259 <rule>
260 <pattern>
261 <pattern-item n="adj"/>
262 <pattern-item n="nom"/>
263 </pattern>
264 <action>
265 <!-- Cheat and set the case and number of the adjective
266 to the values from the following noun. -->
267 <out>
268 <lu>
269 <clip pos="1" side="tl" part="lem"/>
270 <clip pos="1" side="tl" part="a_adj"/>
271 <clip pos="2" side="tl" part="gen"/>
272 <clip pos="2" side="tl" part="nbr"/>
273 <lit-tag v="nom"/>
274 </lu>
275 <b/>
276 <lu>
277 <clip pos="2" side="tl" part="lem"/>
278 <clip pos="2" side="tl" part="a_nom"/>
279 <clip pos="2" side="tl" part="gen"/>
280 <lit-tag v="nom"/>
281 <clip pos="2" side="tl" part="nbr"/>
282 </lu>
283 </out>
284 </action>
285 </rule>
288 </section-rules>
290 </transfer>