File: ige_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 (47 lines) | stat: -rw-r--r-- 1,153 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
#
# igk ragozsi csoportba sorolsa
#
BEGIN { 
    while ((getline var < "ige_mely.1") > 0) { mely[var]=1; }
    while ((getline var < "ige_morfo.1") > 0) { morfo[var]=1; }
}

# mly hangrend igk + i
/[uoa][bcdfghjklmnpqrstvwxyz]*ik$/ || /[uoa][bcdfghjklmnpqrstvwxyz]*t$/ { 
    print $0 "/O" o; next }
/[uoa][bcdfghjklmnpqrstvwxyz]*$/ { 
    if (morfo[$0]==1) { print $0 "/O" o "/d" } 
    else { print $0 "/O" o }
    next
}
# magas, ajakrses
/[ie][bcdfghjklmnpqrstvwxyz]*ik$/ || /[ie][bcdfghjklmnpqrstvwxyz]*t$/ { 
    if (mely[$0]==1) { print $0 "/O" o } 
    else { print $0 "/E" e };
    next
}
/[ie][bcdfghjklmnpqrstvwxyz]*$/ && ! /ik$/ {
    if (mely[$0]==1) { print $0 "/O" o } 
    else { 
		if (morfo[$0]==1) { print $0 "/E" e "/d" } 
		else { print $0 "/E" e };
    }
    next
}
# magas, ajakkerektses
/[][bcdfghjklmnpqrstvwxyz]*ik$/ { 
    if (mely[$0]==1) { print $0 "/O" o } 
    else { print $0 "/P" p };
    next 
}
/[][bcdfghjklmnpqrstvwxyz]*$/ { 
    if (mely[$0]==1) { print $0 "/O" o } 
    else {     
    	if (morfo[$0]==1) { print $0 "/P" p "/d" } 
    	else { print $0 "/P" p };
	}
    next 
}