/[webpac-proto]/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

Contents of /common.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Sun Jun 16 14:37:43 2002 UTC (21 years, 9 months ago) by dpavlin
Branch: MAIN
mored common functions to common.pl

1 #!/usr/bin/perl -w
2
3 use strict;
4
5 #--------------------------------------------------------------------
6 #
7 # mps_expand(nr,"space separated string");
8 #
9
10 sub mps_expand {
11 my $nr = shift @_;
12 my $out = "";
13 while (my $fld = shift @_) {
14 if ($fld =~ s/\s*[,;\.!?'"<>\[\]]*\s+/ /g) {
15 foreach my $w (split(/\s+/,$fld)) {
16 # FIX: this should be replaced by stemmer!
17 $out .= "W $w $nr\n";
18 }
19 } else {
20 $out .= "W $fld $nr\n";
21 }
22 }
23 return c_852_czs($out);
24 }
25
26 1;
27

  ViewVC Help
Powered by ViewVC 1.1.26