4 |
use OpenIsis; |
use OpenIsis; |
5 |
use Getopt::Std; |
use Getopt::Std; |
6 |
#use Data::Dumper; |
#use Data::Dumper; |
7 |
|
require "common.pl"; |
8 |
|
|
9 |
my $install_dir="/local/index"; |
my $install_dir="/local/index"; |
10 |
my $mpsindex="/local/mps-5.3/bin/mpsindex -l 9 -b"; |
my $mpsindex="/local/mps-5.3/bin/mpsindex -l 9 -b"; |
178 |
} |
} |
179 |
|
|
180 |
#-------------------------------------------------------------------- |
#-------------------------------------------------------------------- |
|
# |
|
|
# mps_expand(nr,"space separated string"); |
|
|
# |
|
|
|
|
|
sub mps_expand { |
|
|
my $nr = shift @_; |
|
|
my $out = ""; |
|
|
while (my $fld = shift @_) { |
|
|
if ($fld =~ s/\s*[,;\.!?'"<>\[\]]*\s+/ /g) { |
|
|
foreach my $w (split(/\s+/,$fld)) { |
|
|
# FIX: this should be replaced by stemmer! |
|
|
$out .= "W $w $nr\n"; |
|
|
} |
|
|
} else { |
|
|
$out .= "W $fld $nr\n"; |
|
|
} |
|
|
} |
|
|
return c_852_czs($out); |
|
|
} |
|
|
|
|
|
#-------------------------------------------------------------------- |
|
181 |
|
|
182 |
# $mps .= sf_to_mps($subfiled_hash,"subfields",mps_id); |
# $mps .= sf_to_mps($subfiled_hash,"subfields",mps_id); |
183 |
# |
# |