File: igee3_gen.awk

package info (click to toggle)
magyarispell 0.99.4-1.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,988 kB
  • ctags: 132
  • sloc: sh: 883; awk: 337; makefile: 240
file content (54 lines) | stat: -rw-r--r-- 1,454 bytes parent folder | download | duplicates (3)
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
#
# befejezett mellknvi igenevek ellltsa
#
BEGIN { 
    while ((getline var < "ige_mely.1") > 0) { mely[var]=1; }
    while ((getline var < "ige_morfo.1") > 0) { morfo[var]=1; }
    RAGOK["mly"]="/A/D/F/Q/U"
    RAGOK["ajakrses"]="/B/D/L/G/R/V"
    RAGOK["ajakkerektses"]="/C/D/H/R/W"
    KOTOHANG["mly"]="o"
    KOTOHANG["ajakrses"]="e"
    KOTOHANG["ajakkerektses"]=""
}

function tt(szo) {
    print szo KOTOHANG[hangrend] "tt" RAGOK[hangrend]
}

function t(szo) {
    print szo "t" RAGOK[hangrend]
}

# ajakrses magas
/[ie][bcdfghjklmnpqrstvwxyz]*ik$/ ||
/[ie][bcdfghjklmnpqrstvwxyz]*t$/ ||
/[ie][bcdfghjklmnpqrstvwxyz]*$/ && ! /ik$/ { hangrend="ajakrses" }

# ajakkerektses magas
/[][bcdfghjklmnpqrstvwxyz]*ik$/ ||
/[][bcdfghjklmnpqrstvwxyz]*$/ { hangrend="ajakkerektses" }

# mly hangrend
{ if (mely[$0]==1) hangrend="mly" }
/[uoa][bcdfghjklmnpqrstvwxyz]*ik$/ || 
/[uoa][bcdfghjklmnpqrstvwxyz]*t$/ ||
/[uoa][bcdfghjklmnpqrstvwxyz]*$/ { hangrend="mly" }

# -tt rag
(/[bdfgkmpstvz]$/ && ! /ik$/) || /gy$/ || /[nl]l$/ { tt($1) } # vgyott
/[bdfgkmpstvz]ik$/ || /llik$/ { tt(substr($1,1,length($1)-2)) }
/[^aeiou][^bgkmpstvzyd]ik$/ || 
    /[bdgjklmrtzy][ldgrz]ik$/ ||
    /gyik$/ { tt(substr($1,1,length($1)-2)) } # vgyott

# -t rag
(/[^bgkmpstvzyd]$/ && ! /^kell$/) || /ny$/ { t($1) } # hunyt
/[aeiou][^bgkmpstvzyd]ik$/ ||
    /lyik$/ { t(substr($1,1,length($1)-2)) } # folyt