One more
[apertium.git] / apertium-cy-en / apertium-cy-en.en-cy.t1x
blobf8cb7a9ec5fe14d83666f99f3f98687a558dc860
1 <?xml version="1.0" encoding="UTF-8"?> <!-- -*- nxml -*- -->
3 <transfer default="chunk">
4 <section-def-cats>
5 <def-cat n="nom">
6 <cat-item tags="n.*"/><!--Falten els altres np (antroponims) que tenen gen i nbr, revisar regles.-->
7 <cat-item tags="np.loc"/>
8 </def-cat>
9 </section-def-cats>
10 <section-def-attrs>
11 <def-attr n="a_nom">
12 <attr-item tags="n"/>
13 <attr-item tags="n.acr"/>
14 <attr-item tags="n.unc"/>
15 <attr-item tags="np.loc"/>
16 <attr-item tags="np.ant"/>
17 </def-attr>
18 <def-attr n="nbr">
19 <attr-item tags="sg"/>
20 <attr-item tags="pl"/>
21 <attr-item tags="sp"/>
22 <attr-item tags="ND"/>
23 </def-attr>
24 <def-attr n="gen">
25 <attr-item tags="f"/>
26 <attr-item tags="m"/>
27 <attr-item tags="mf"/>
28 <attr-item tags="nt"/>
29 </def-attr>
30 </section-def-attrs>
31 <section-def-vars>
32 <def-var n="numero"/>
33 <def-var n="genere"/>
34 <def-var n="nombre"/>
35 <def-var n="caseFirstWord"/>
36 <def-var n="EOS"/>
37 </section-def-vars>
39 <section-def-macros>
40 <def-macro n="firstWord" npar="1">
41 <choose>
42 <when>
43 <test>
44 <equal>
45 <clip pos="1" side="sl" part="a_np_acr"/>
46 <lit v=""/>
47 </equal>
48 </test>
49 <choose>
50 <when>
51 <test>
52 <equal>
53 <var n="EOS"/>
54 <lit v="true"/>
55 </equal>
56 </test>
57 <modify-case>
58 <clip pos="1" side="tl" part="lem"/>
59 <lit v="aa"/>
60 </modify-case>
61 <let>
62 <var n="caseFirstWord"/>
63 <lit v="Aa"/>
64 </let>
65 </when>
66 </choose>
67 </when>
68 <otherwise>
69 <let>
70 <var n="caseFirstWord"/>
71 <lit v="aa"/>
72 </let>
73 </otherwise>
74 </choose>
75 <let>
76 <var n="EOS"/>
77 <lit v="false"/>
78 </let>
79 </def-macro>
81 <def-macro n="genere_nombre" npar="1">
82 <choose>
83 <when>
84 <test>
85 <equal>
86 <clip pos="1" side="tl" part="gen"/>
87 <lit-tag v="m"/>
88 </equal>
89 </test>
90 <let><var n="genere"/><lit-tag v="m"/></let>
91 </when>
92 <when>
93 <test>
94 <equal>
95 <clip pos="1" side="tl" part="gen"/>
96 <lit-tag v="f"/>
97 </equal>
98 </test>
99 <let><var n="genere"/><lit-tag v="f"/></let>
100 </when>
101 </choose>
102 <choose>
103 <when>
104 <test>
105 <equal>
106 <clip pos="1" side="tl" part="nbr"/>
107 <lit-tag v="sg"/>
108 </equal>
109 </test>
110 <let><var n="nombre"/><lit-tag v="sg"/></let>
111 </when>
112 <when>
113 <test>
114 <equal>
115 <clip pos="1" side="tl" part="nbr"/>
116 <lit-tag v="pl"/>
117 </equal>
118 </test>
119 <let><var n="nombre"/><lit-tag v="pl"/></let>
120 </when>
121 </choose>
122 </def-macro>
124 </section-def-macros>
125 <section-rules>
126 <!-- <rule comment="REGLA: NOM (per a collocar la cua en les multiparaules amb g">
127 <pattern>
128 <pattern-item n="nom"/>
129 </pattern>
130 <action>
131 <out>
132 <chunk name="nom" case="caseFirstWord">
133 <tags>
134 <tag><lit-tag v="SN"/></tag>
135 <tag><clip pos="1" side="tl" part="gen"/></tag>
136 <tag><clip pos="1" side="tl" part="nbr"/></tag>
137 </tags>
138 <lu>
139 <clip pos="1" side="tl" part="lemh"/>
140 <clip pos="1" side="tl" part="a_nom"/>
141 <clip pos="1" side="tl" part="gen_sense_mf" link-to="2"/>
142 <clip pos="1" side="tl" part="gen_mf"/>
143 <clip pos="1" side="tl" part="nbr_sense_sp" link-to="3"/>
144 <clip pos="1" side="tl" part="nbr"/>
145 <clip pos="1" side="tl" part="lemq"/>
146 </lu>
147 </chunk>
148 </out>
149 </action>
150 </rule> -->
152 <rule comment="REGLA: NOM (per a donar valor a la variable de gènere, i per a col·locar la cua en les multiparaules amb g"> <pattern>
153 <pattern-item n="nom"/>
154 </pattern>
155 <action>
156 <call-macro n="genere_nombre">
157 <with-param pos="1"/>
158 </call-macro>
159 <call-macro n="firstWord">
160 <with-param pos="1"/>
161 </call-macro>
162 <out>
163 <chunk name="nom" case="caseFirstWord">
164 <tags>
165 <tag><lit-tag v="SN.UNDET"/></tag>
166 <tag><clip pos="1" side="tl" part="gen"/></tag>
167 <tag><clip pos="1" side="tl" part="nbr"/></tag>
168 </tags>
169 <lu>
170 <clip pos="1" side="tl" part="lemh"/>
171 <clip pos="1" side="tl" part="a_nom"/>
172 <clip pos="1" side="tl" part="gen" link-to="3"/>
173 <!-- <clip pos="1" side="tl" part="nbr" link-to="4"/> -->
174 <!-- <clip pos="1" side="tl" part="gen" link-to="1"/> -->
175 <clip pos="1" side="tl" part="nbr"/>
176 <clip pos="1" side="tl" part="lemq"/>
177 </lu>
178 </chunk>
179 </out>
180 <let>
181 <var n="caseFirstWord"/>
182 <lit v="aa"/>
183 </let>
184 </action>
185 </rule>
187 </section-rules>
188 </transfer>