Parent Directory | Revision Log
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 |