-
Notifications
You must be signed in to change notification settings - Fork 0
/
maori.sbl
71 lines (54 loc) · 1.35 KB
/
maori.sbl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
routines (
R1 R2 RV
mark_regions
verb_sfx
)
externals ( stem )
integers ( pV p1 p2 )
groupings ( v )
stringescapes {}
/* special characters (long vowels using diacritics) */
stringdef a_ '{U+0101}' // a-macron
stringdef e_ '{U+0113}' // e-macron
stringdef i_ '{U+012B}' // i-macron
stringdef o_ '{U+014D}' // o-macron
stringdef u_ '{U+016B}' // u-macron
stringdef a" '{U+00E4}' // a-diaeresis
stringdef e" '{U+00EB}' // e-diaeresis
stringdef i" '{U+00EF}' // i-diaeresis
stringdef o" '{U+00F6}' // o-diaeresis
stringdef u" '{U+00FC}' // u-diaeresis
/* define vowels */
define v 'aeiou{a_}{e_}{i_}{o_}{u_}{a"}{e"}{i"}{o"}{u"}'
define mark_regions as (
$pV = limit
$p1 = limit
$p2 = limit // defaults
do (
gopast v setmark pV
)
do (
gopast v gopast non-v setmark p1
gopast v gopast non-v setmark p2
)
)
backwardmode (
define RV as $pV <= cursor
define R1 as $p1 <= cursor
define R2 as $p2 <= cursor
/* strip passive verb endings */
define verb_sfx as (
[substring] among (
'tia' 'hia' 'ngia' 'kia' 'mia' 'ria' 'whia' 'wh{a_}ia' 'wh{a"}ia' 'ia'
'ina' 'whina' 'kina'
'nga' 'na' 'a'
(RV delete)
)
)
)
define stem as (
do mark_regions
backwards (
do verb_sfx
)
)