fixup! Fix coding style
[xapian.git] / xapian-core / languages / armenian.sbl
blob0a6328ac1b2f672c7c378aa9c83739dc17f835da
1 // Alias: hy
2 // From: http://snowballstem.org/algorithms/armenian/stemmer.html
3 // Author: Astghik Mkrtchyan
4 // Licence: 3-clause BSD, as per http://snowballstem.org/license.html
6 stringescapes {}
8 stringdef a    hex '561' // 531
9 stringdef b    hex '562' // 532
10 stringdef g    hex '563' // 533
11 stringdef d    hex '564' // 534
12 stringdef ye   hex '565' // 535
13 stringdef z    hex '566' // 536
14 stringdef e    hex '567' // 537
15 stringdef y    hex '568' // 538
16 stringdef dt   hex '569' // 539
17 stringdef zh   hex '56A' // 53A
18 stringdef i    hex '56B' // 53B
19 stringdef l    hex '56C' // 53C
20 stringdef kh   hex '56D' // 53D
21 stringdef ts   hex '56E' // 53E
22 stringdef k    hex '56F' // 53F
23 stringdef h    hex '570' // 540
24 stringdef dz   hex '571' // 541
25 stringdef gh   hex '572' // 542
26 stringdef djch hex '573' // 543
27 stringdef m    hex '574' // 544
28 stringdef j    hex '575' // 545
29 stringdef n    hex '576' // 546
30 stringdef sh   hex '577' // 547
31 stringdef vo   hex '578' // 548
32 stringdef ch   hex '579' // 549
33 stringdef p    hex '57A' // 54A
34 stringdef dj   hex '57B' // 54B
35 stringdef r    hex '57C' // 54C
36 stringdef s    hex '57D' // 54D
37 stringdef v    hex '57E' // 54E
38 stringdef t    hex '57F' // 54F
39 stringdef r'   hex '580' // 550
40 stringdef c    hex '581' // 551
41 stringdef u    hex '582' // 552                  //vjun
42 stringdef bp   hex '583' // 553
43 stringdef q    hex '584' // 554
44 stringdef ev   hex '587'
45 stringdef o    hex '585' // 555
46 stringdef f    hex '586' // 556
48 routines ( mark_regions R2
49            adjective
50            verb
51            noun
52            ending
55 externals ( stem )
57 integers ( pV p2 )
59 groupings ( v )
61 define v '{a}{e}{i}{o}{u}{ye}{vo}{y}'
63 define mark_regions as (
65     $pV = limit
66     $p2 = limit
67     do (
68         gopast v  setmark pV  gopast non-v
69         gopast v  gopast non-v  setmark p2
70        )
73 backwardmode (
75     define R2 as $p2 <= cursor
77     define adjective as (
78         [substring] among (
79             '{b}{a}{r'}'
80             '{p}{ye}{s}'
81             '{vo}{r'}{e}{n}'
82             '{vo}{v}{i}{n}'
83             '{a}{k}{i}'
84             '{l}{a}{j}{n}'
85             '{r'}{vo}{r'}{d}'
86             '{ye}{r'}{vo}{r'}{d}'
87             '{a}{k}{a}{n}'
88             '{a}{l}{i}'
89             '{k}{vo}{t}'
90             '{ye}{k}{ye}{n}'
91             '{vo}{r'}{a}{k}'
92             '{ye}{gh}'
93             '{v}{vo}{u}{n}'
94             '{ye}{r'}{ye}{n}'
95             '{a}{r'}{a}{n}'
96             '{ye}{n}'
97             '{a}{v}{ye}{t}'
98             '{g}{i}{n}'
99             '{i}{v}'
100             '{a}{t}'
101             '{i}{n}'
103               (delete)
104         )
105     )
107     define verb as (
108         [substring] among (
109             '{vo}{u}{m}'
110             '{v}{vo}{u}{m}'
111             '{a}{l}{vo}{u}'
112             '{ye}{l}{vo}{u}'
113             '{v}{ye}{l}'
114             '{a}{n}{a}{l}'
115             '{ye}{l}{vo}{u}{c}'
116             '{a}{l}{vo}{u}{c}'
117             '{y}{a}{l}'
118             '{y}{ye}{l}'
119             '{a}{l}{vo}{v}'
120             '{ye}{l}{vo}{v}'
121             '{a}{l}{i}{s}'
122             '{ye}{l}{i}{s}'
123             '{ye}{n}{a}{l}'
124             '{a}{c}{n}{a}{l}'
125             '{ye}{c}{n}{ye}{l}'
126             '{c}{n}{ye}{l}'
127             '{n}{ye}{l}'
128             '{a}{t}{ye}{l}'
129             '{vo}{t}{ye}{l}'
130             '{k}{vo}{t}{ye}{l}'
131             '{t}{ye}{l}'
132             '{v}{a}{ts}'
133             '{ye}{c}{v}{ye}{l}'
134             '{a}{c}{v}{ye}{l}'
135             '{ye}{c}{i}{r'}'
136             '{a}{c}{i}{r'}'
137             '{ye}{c}{i}{n}{q}'
138             '{a}{c}{i}{n}{q}'
139             '{v}{ye}{c}{i}{r'}'
140             '{v}{ye}{c}{i}{n}{q}'
141             '{v}{ye}{c}{i}{q}'
142             '{v}{ye}{c}{i}{n}'
143             '{a}{c}{r'}{i}{r'}'
144             '{a}{c}{r'}{ye}{c}'
145             '{a}{c}{r'}{i}{n}{q}'
146             '{a}{c}{r'}{i}{q}'
147             '{a}{c}{r'}{i}{n}'
148             '{ye}{c}{i}{q}'
149             '{a}{c}{i}{q}'
150             '{ye}{c}{i}{n}'
151             '{a}{c}{i}{n}'
152             '{a}{c}{a}{r'}'
153             '{a}{c}{a}{v}'
154             '{a}{c}{a}{n}{q}'
155             '{a}{c}{a}{q}'
156             '{a}{c}{a}{n}'
157             '{v}{ye}{c}{i}'
158             '{a}{c}{r'}{i}'
159             '{ye}{c}{a}{r'}'
160             '{ye}{c}{a}{v}'
161             '{c}{a}{n}{q}'
162             '{c}{a}{q}'
163             '{c}{a}{n}'
164             '{a}{c}{a}'
165             '{a}{c}{i}'
166             '{ye}{c}{a}'
167             '{ch}{ye}{l}'
168             '{ye}{c}{i}'
169             '{a}{r'}'
170             '{a}{v}'
171             '{a}{n}{q}'
172             '{a}{q}'
173             '{a}{n}'
174             '{a}{l}'
175             '{ye}{l}'
176             '{ye}{c}'
177             '{a}{c}'
178             '{v}{ye}'
179             '{a}'
181                 (delete)
182         )
183     )
185     define noun as (
186         [substring] among (
187             '{a}{ts}{vo}'
188             '{a}{n}{a}{k}'
189             '{a}{n}{o}{c}'
190             '{a}{r'}{a}{n}'
191             '{a}{r'}{q}'
192             '{p}{a}{n}'
193             '{s}{t}{a}{n}'
194             '{ye}{gh}{e}{n}'
195             '{ye}{n}{q}'
196             '{i}{k}'
197             '{i}{ch}'
198             '{i}{q}'
199             '{m}{vo}{u}{n}{q}'
200             '{j}{a}{k}'
201             '{j}{vo}{u}{n}'
202             '{vo}{n}{q}'
203             '{vo}{r'}{d}'
204             '{vo}{c}'
205             '{ch}{ye}{q}'
206             '{v}{a}{ts}{q}'
207             '{v}{vo}{r'}'
208             '{a}{v}{vo}{r'}'
209             '{vo}{u}{dt}{j}{vo}{u}{n}'
210             '{vo}{u}{k}'
211             '{vo}{u}{h}{i}'
212             '{vo}{u}{j}{dt}'
213             '{vo}{u}{j}{q}'
214             '{vo}{u}{s}{t}'
215             '{vo}{u}{s}'
216             '{c}{i}'
217             '{a}{l}{i}{q}'
218             '{a}{n}{i}{q}'
219             '{i}{l}'
220             '{i}{ch}{q}'
221             '{vo}{u}{n}{q}'
222             '{g}{a}{r'}'
223             '{vo}{u}'
224             '{a}{k}'
225             '{a}{n}'
226             '{q}'
228                 (delete)
229         )
230     )
232     define ending as (
233         [substring] R2 among (
234             '{n}{ye}{r'}{y}'
235             '{n}{ye}{r'}{n}'
236             '{n}{ye}{r'}{i}'
237             '{n}{ye}{r'}{d}'
238             '{ye}{r'}{i}{c}'
239             '{n}{ye}{r'}{i}{c}'
240             '{ye}{r'}{i}'
241             '{ye}{r'}{d}'
242             '{ye}{r'}{n}'
243             '{ye}{r'}{y}'
244             '{n}{ye}{r'}{i}{n}'
245             '{vo}{u}{dt}{j}{a}{n}{n}'
246             '{vo}{u}{dt}{j}{a}{n}{y}'
247             '{vo}{u}{dt}{j}{a}{n}{s}'
248             '{vo}{u}{dt}{j}{a}{n}{d}'
249             '{vo}{u}{dt}{j}{a}{n}'
250             '{ye}{r'}{i}{n}'
251             '{i}{n}'
252             '{s}{a}'
253             '{vo}{dj}'
254             '{i}{c}'
255             '{ye}{r'}{vo}{v}'
256             '{n}{ye}{r'}{vo}{v}'
257             '{ye}{r'}{vo}{u}{m}'
258             '{n}{ye}{r'}{vo}{u}{m}'
259             '{vo}{u}{n}'
260             '{vo}{u}{d}'
261             '{v}{a}{n}{s}'
262             '{v}{a}{n}{y}'
263             '{v}{a}{n}{d}'
264             '{a}{n}{y}'
265             '{a}{n}{d}'
266             '{v}{a}{n}'
267             '{vo}{dj}{y}'
268             '{vo}{dj}{s}'
269             '{vo}{dj}{d}'
270             '{vo}{c}'
271             '{vo}{u}{c}'
272             '{vo}{dj}{i}{c}'
273             '{c}{i}{c}'
274             '{v}{i}{c}'
275             '{v}{i}'
276             '{v}{vo}{v}'
277             '{vo}{v}'
278             '{a}{n}{vo}{v}'
279             '{a}{n}{vo}{u}{m}'
280             '{v}{a}{n}{i}{c}'
281             '{a}{m}{b}'
282             '{a}{n}'
283             '{n}{ye}{r'}'
284             '{ye}{r'}'
285             '{v}{a}'
286             '{y}'
287             '{n}'
288             '{d}'
289             '{c}'
290             '{i}'
292                 (delete)
293         )
294     )
297 define stem as (
299     do mark_regions
300     backwards setlimit tomark pV for (
301         do ending
302         do verb
303         do adjective
304         do noun
305     )