Debian Codegraph @

tests/data/apertium-nno-nob.nno-nob.t3x

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- -*- nxml -*- -->
3 <postchunk>
4 <section-def-cats>
5 <def-cat n="n">
6 <cat-item name="n"/>
7 </def-cat>
8 <def-cat n="hasmacro">
9 <cat-item name="hasmacro"/>
10 </def-cat>
11 <def-cat n="thing">
12 <cat-item name="thing"/>
13 </def-cat>
14 <def-cat n="nomacro">
15 <cat-item name="nomacro"/>
16 </def-cat>
17 <def-cat n="n_n">
18 <cat-item name="n_n"/>
19 </def-cat>
20 <def-cat n="n_n2">
21 <cat-item name="n_n2"/>
22 </def-cat>
23 <def-cat n="n_n3">
24 <cat-item name="n_n3"/>
25 </def-cat>
26 <def-cat n="n_n4">
27 <cat-item name="n_n4"/>
28 </def-cat>
29 <def-cat n="thing_wb">
30 <cat-item name="thing_wb"/>
31 </def-cat>
32 </section-def-cats>
33
34
35 <section-def-attrs>
36 <def-attr n="gen">
37 <attr-item tags="m"/>
38 <attr-item tags="mf"/>
39 <attr-item tags="nt"/>
40 <attr-item tags="f"/>
41 <attr-item tags="GD"/>
42 </def-attr>
43 <def-attr n="art">
44 <attr-item tags="def"/>
45 <attr-item tags="ind"/>
46 </def-attr>
47 <def-attr n="a_verb">
48 <attr-item tags="nomacro"/>
49 <attr-item tags="nomacro.pstv"/>
50 </def-attr>
51 <def-attr n="temps">
52 <attr-item tags="inf"/>
53 <attr-item tags="imp"/>
54 <attr-item tags="pres"/>
55 <attr-item tags="pret"/>
56 <attr-item tags="pp"/>
57 </def-attr>
58 <def-attr n="voice">
59 <attr-item tags="pasv"/>
60 </def-attr>
61 <def-attr n="nbr">
62 <attr-item tags="sg"/>
63 <attr-item tags="pl"/>
64 <attr-item tags="sp"/>
65 <attr-item tags="ND"/>
66 </def-attr>
67 </section-def-attrs>
68
69 <section-def-vars>
70 <def-var n="foo"/>
71 </section-def-vars>
72
73
74 <section-def-macros>
75 <def-macro n="out_adj" npar="1">
76 <choose><when>
77 <test><and>
78 <equal><clip pos="1" part="nbr"/><lit-tag v="sg"/></equal>
79 <equal><clip pos="1" part="art"/><lit v=""/></equal>
80 </and></test>
81 <let><clip pos="1" part="nbr"/><concat><clip pos="1" part="nbr"/><lit-tag v="def"/></concat></let>
82 <let><clip pos="1" part="gen"/><concat><lit v=""/></concat></let>
83 </when></choose>
84
85 <out><lu><clip pos="1" part="whole"/></lu></out>
86 </def-macro>
87
88 <def-macro n="default_to_chunk_number" npar="2"
89 c="arg1: lu, arg2: chunk">
90 <choose><when>
91 <test><and>
92 <not><equal><clip pos="2" part="nbr"/><lit v=""/></equal></not>
93 <equal><clip pos="1" part="nbr"/><lit-tag v="ND"/></equal>
94 </and></test>
95 <let><clip pos="1" part="nbr"/><clip pos="2" part="nbr"/></let>
96 </when></choose>
97 </def-macro>
98 </section-def-macros>
99
100
101 <section-rules>
102
103 <rule comment="CHUNK: adj">
104 <pattern>
105 <pattern-item n="hasmacro"/>
106 </pattern>
107 <action>
108 <call-macro n="out_adj"><with-param pos="1"/></call-macro>
109 </action>
110 </rule>
111
112 <rule comment="CHUNK: nomacro">
113 <pattern>
114 <pattern-item n="nomacro"/>
115 </pattern>
116 <action>
117 <choose>
118 <when><test><and>
119 <equal><clip pos="0" part="tags"/><lit-tag v="nomacro.inf.pasv"/></equal>
120 <equal><clip pos="1" part="temps"/><lit-tag v="pp"/></equal>
121 </and></test>
122 <out>
123 <lu>
124 <clip pos="1" part="lemh"/>
125 <clip pos="1" part="a_verb"/>
126 <clip pos="0" part="temps"/>
127 <clip pos="0" part="voice"/>
128 <clip pos="1" part="lemq"/>
129 </lu>
130 </out>
131 </when>
132 <otherwise>
133 <out><lu><clip pos="1" part="whole"/></lu></out>
134 </otherwise>
135 </choose>
136 </action>
137 </rule>
138
139 <rule comment="CHUNK: thing">
140 <pattern>
141 <pattern-item n="thing"/>
142 </pattern>
143 <action>
144 <call-macro n="default_to_chunk_number"><with-param pos="1"/><with-param pos="0"/></call-macro>
145 <out>
146 <lu><clip pos="1" part="whole"/></lu>
147 </out>
148 </action>
149 </rule>
150
151 <rule comment="CHUNK: blank n_n"> <!-- dummy rule for blank testing -->
152 <pattern>
153 <pattern-item n="n_n"/>
154 </pattern>
155 <action>
156 <let><clip pos="2" part="art"/><clip pos="0" part="art"/></let>
157 <out>
158 <lu><clip pos="2" part="whole"/></lu>
159 <b pos="1"/>
160 <lu><clip pos="1" part="whole"/></lu>
161 <b/>
162 <mlu>
163 <lu><clip pos="1" part="lemh"/></lu>
164 <lu><clip pos="2" part="lem"/></lu>
165 </mlu>
166 </out>
167 </action>
168 </rule>
169
170 <rule comment="CHUNK: thing_wblank">
171 <pattern>
172 <pattern-item n="thing_wb"/>
173 </pattern>
174 <action>
175 <call-macro n="default_to_chunk_number"><with-param pos="1"/><with-param pos="0"/></call-macro>
176 <out>
177 <lu><concat><lit v="newthing"/><lit-tag v="adj.sg"/></concat></lu>
178 <b/>
179 <lu><clip pos="1" part="whole"/></lu>
180 <b/>
181 <mlu>
182 <lu><clip pos="1" part="whole"/></lu>
183 <lu><concat><lit v="newpr"/><lit-tag v="pr"/></concat></lu>
184 </mlu>
185 </out>
186 </action>
187 </rule>
188
189 <rule comment="CHUNK: superblank rule 1">
190 <pattern>
191 <pattern-item n="n_n2"/>
192 </pattern>
193 <action>
194 <let><clip pos="2" part="art"/><clip pos="0" part="art"/></let>
195 <out>
196 <lu><clip pos="2" part="whole"/></lu>
197 <b/>
198 <lu><clip pos="1" part="whole"/></lu>
199 <b/>
200 <mlu>
201 <lu><clip pos="1" part="lemh"/></lu>
202 <lu><clip pos="2" part="lem"/></lu>
203 </mlu>
204 <b/>
205 <lu><clip pos="3" part="whole"/></lu>
206 </out>
207 </action>
208 </rule>
209
210 <rule comment="CHUNK: superblank rule 2">
211 <pattern>
212 <pattern-item n="n_n3"/>
213 </pattern>
214 <action>
215 <let><clip pos="2" part="art"/><clip pos="0" part="art"/></let>
216 <out>
217 <lu><clip pos="2" part="whole"/></lu>
218 <lu><clip pos="1" part="whole"/></lu>
219 <mlu>
220 <lu><clip pos="1" part="lemh"/></lu>
221 <lu><clip pos="2" part="lem"/></lu>
222 </mlu>
223 <lu><clip pos="3" part="whole"/></lu>
224 </out>
225 </action>
226 </rule>
227
228 <rule comment="CHUNK: superblank rule 3">
229 <pattern>
230 <pattern-item n="n_n4"/>
231 </pattern>
232 <action>
233 <let><clip pos="2" part="art"/><clip pos="0" part="art"/></let>
234 <out>
235 <lu><clip pos="2" part="whole"/></lu>
236 <lu><clip pos="1" part="whole"/></lu>
237 <b/>
238 <mlu>
239 <lu><clip pos="1" part="lemh"/></lu>
240 <lu><clip pos="2" part="lem"/></lu>
241 </mlu>
242 <lu><clip pos="3" part="whole"/></lu>
243 </out>
244 </action>
245 </rule>
246
247 </section-rules>
248 </postchunk>