23 |
F 686 10 CC |
F 686 10 CC |
24 |
F 990 11 Signatura |
F 990 11 Signatura |
25 |
F 991 12 Inventarni broj |
F 991 12 Inventarni broj |
26 |
F 10 13 ISBN |
F ISBN 13 ISBN |
27 |
F MFN 14 MFN |
F MFN 14 MFN |
28 |
F 215+ 15 Materijalni opis |
F 215+ 15 Materijalni opis |
29 |
"; |
"; |
30 |
|
|
31 |
|
$common::database_cf="/local/search/databases.cf"; |
32 |
|
|
33 |
#-------------------------------------------------------------------- |
#-------------------------------------------------------------------- |
34 |
# |
# |
35 |
# mps_expand(nr,"space separated string"); |
# mps_expand(nr,"space separated string"); |
40 |
my $out = ""; |
my $out = ""; |
41 |
while (my $fld = shift @_) { |
while (my $fld = shift @_) { |
42 |
if ($fld =~ s/\s*[,;\.!?'"<>\[\]]*\s+/ /g) { |
if ($fld =~ s/\s*[,;\.!?'"<>\[\]]*\s+/ /g) { |
43 |
|
$fld =~ s/></ /g; |
44 |
foreach my $w (split(/\s+/,$fld)) { |
foreach my $w (split(/\s+/,$fld)) { |
45 |
# FIX: this should be replaced by stemmer! |
# FIX: this should be replaced by stemmer! |
46 |
$out .= "W $w $nr\n"; |
# remove chars from beginning of word |
47 |
|
$w =~ s/^['"<(\[]//g; |
48 |
|
# remove chars from end of word |
49 |
|
$w =~ s/[,;\.!?'">)\]]$//g; |
50 |
|
# preglasi φΦδΔόά -> |
51 |
|
if ($w =~ m/[]/) { |
52 |
|
$out .= "W $w $nr\n"; |
53 |
|
$w =~ s/[]/oe/g; |
54 |
|
$w =~ s/[]/ae/g; |
55 |
|
$w =~ s/[]/ue/g; |
56 |
|
$out .= "W $w $nr\n"; |
57 |
|
# Irish Last names |
58 |
|
} elsif (($nr == 1 || $nr == 2 || $nr == 3 || $nr == 6 || $nr == 7 || $nr == 8) && $w =~ m/^Ma?c([A-Z].+)/) { |
59 |
|
$out .= "W Mc$1 $nr\n"; |
60 |
|
$out .= "W Mac$1 $nr\n"; |
61 |
|
} else { |
62 |
|
$out .= "W $w $nr\n"; |
63 |
|
} |
64 |
} |
} |
65 |
} else { |
} else { |
66 |
$out .= "W $fld $nr\n"; |
$out .= "W $fld $nr\n"; |