line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- Mode: Perl -*- |
2
|
|
|
|
|
|
|
# Adjektiv.pm -- |
3
|
|
|
|
|
|
|
# Author : Ulrich Pfeifer |
4
|
|
|
|
|
|
|
# Created On : Thu Feb 1 09:10:48 1996 |
5
|
|
|
|
|
|
|
# Last Modified By: Ulrich Pfeifer |
6
|
|
|
|
|
|
|
# Last Modified On: Sun Apr 3 11:42:22 2005 |
7
|
|
|
|
|
|
|
# Language : Perl |
8
|
|
|
|
|
|
|
# Update Count : 22 |
9
|
|
|
|
|
|
|
# Status : Unknown, Use with caution! |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package Text::German::Adjektiv; |
12
|
2
|
|
|
2
|
|
11
|
use Text::German::Util; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
787
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
{ |
15
|
|
|
|
|
|
|
local ($_); |
16
|
|
|
|
|
|
|
while () { |
17
|
|
|
|
|
|
|
chomp; |
18
|
|
|
|
|
|
|
($adjektiv, $key) = split; |
19
|
|
|
|
|
|
|
$ADJEKTIV{$adjektiv} = [split ':', $key]; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
close DATA; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub reduce { |
25
|
17
|
|
|
17
|
0
|
33
|
my($v,$s,$e) = @_; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
#return undef unless $v.$s.$e =~ /$UMLAUTR/o; |
29
|
17
|
|
|
|
|
25
|
while (1) { # algorithmus unklar |
30
|
41
|
50
|
|
|
|
85
|
if (defined $ADJECTIV{$s}) { |
31
|
0
|
|
|
|
|
0
|
return ($v, $ADJECTIV{$s}->[0], $e); |
32
|
|
|
|
|
|
|
} |
33
|
41
|
|
|
|
|
53
|
$s .= substr($e,0,1); |
34
|
41
|
100
|
|
|
|
81
|
last unless $e; |
35
|
24
|
|
|
|
|
32
|
$e = substr($e,1); |
36
|
|
|
|
|
|
|
} |
37
|
17
|
|
|
|
|
50
|
return undef; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
__DATA__ |