/[local]/common.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /common.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by dpavlin, Sun Jun 16 18:11:14 2002 UTC revision 1.10 by dpavlin, Mon Sep 23 18:46:21 2002 UTC
# Line 6  use strict; Line 6  use strict;
6    
7  $common::install_dir="/local/index";  $common::install_dir="/local/index";
8  $common::mpsindex="/local/mps-5.3/bin/mpsindex -l 9 -b";  $common::mpsindex="/local/mps-5.3/bin/mpsindex -l 9 -b";
9  $common::isis_data="/var/autofs/misc/isis_data/";  #$common::isis_data="/var/autofs/misc/isis_data/";
10    $common::isis_data="/data/isis_data/";
11  #$common::isis_data="/mnt/20020606/Isis/Data/"; # doma  #$common::isis_data="/mnt/20020606/Isis/Data/"; # doma
12    
13  $common::mps_header="V 5 3  $common::mps_header="V 5 3
# Line 23  F 675 9 UDK Line 24  F 675 9 UDK
24  F 686 10 CC  F 686 10 CC
25  F 990 11 Signatura  F 990 11 Signatura
26  F 991 12 Inventarni broj  F 991 12 Inventarni broj
27  F 10 13 ISBN  F ISN 13 ISBN, ISSN
28  F MFN 14 MFN  F MFN 14 MFN
29  F 215+ 15 Materijalni opis  F 215+ 15 Materijalni opis
30    F 101 16 Jezik
31    F tip 17 Tip graπe
32  ";  ";
33    
34    $common::database_cf="/local/search/databases.cf";
35    
36  #--------------------------------------------------------------------  #--------------------------------------------------------------------
37  #  #
38  # mps_expand(nr,"space separated string");  # mps_expand(nr,"space separated string");
# Line 38  sub mps_expand { Line 43  sub mps_expand {
43          my $out = "";          my $out = "";
44          while (my $fld = shift @_) {          while (my $fld = shift @_) {
45                  if ($fld =~ s/\s*[,;\.!?'"<>\[\]]*\s+/ /g) {                  if ($fld =~ s/\s*[,;\.!?'"<>\[\]]*\s+/ /g) {
46                            $fld =~ s/></ /g;
47                          foreach my $w (split(/\s+/,$fld)) {                          foreach my $w (split(/\s+/,$fld)) {
48                                  # FIX: this should be replaced by stemmer!                                  # FIX: this should be replaced by stemmer!
49                                  $out .= "W $w $nr\n";                                  # remove chars from beginning of word
50                                    $w =~ s/^['"<(\[]//g;
51                                    # remove chars from end of word
52                                    $w =~ s/[,;\.!?'">)\]]$//g;
53                                    # preglasi φΦδΔόά -> ”™„Žš
54                                    if ($w =~ m/[”™„Žš]/) {
55                                            $out .= "W $w $nr\n";
56                                            $w =~ s/[”™]/oe/g;
57                                            $w =~ s/[„Ž]/ae/g;
58                                            $w =~ s/[š]/ue/g;
59                                            $out .= "W $w $nr\n";
60                                    # Irish Last names
61                                    } elsif (($nr == 1 || $nr == 2 || $nr == 3 || $nr == 6 || $nr == 7 || $nr == 8) && $w =~ m/^Ma?c([A-Z].+)/) {
62                                            $out .= "W Mc$1 $nr\n";
63                                            $out .= "W Mac$1 $nr\n";
64                                    } else {
65                                            $out .= "W $w $nr\n";
66                                    }
67                          }                          }
68                  } else {                  } else {
69                          $out .= "W $fld $nr\n";                          $out .= "W $fld $nr\n";

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.26