/[Semantic-Engine]/EPrints/EPrints.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 /EPrints/EPrints.pm

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

revision 16 by dpavlin, Fri Jun 29 22:54:51 2007 UTC revision 17 by dpavlin, Sat Jun 30 13:46:51 2007 UTC
# Line 9  use Encode qw/from_to decode_utf8 decode Line 9  use Encode qw/from_to decode_utf8 decode
9  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
10  use DBI;  use DBI;
11  use URI::Escape;  use URI::Escape;
12    use Carp qw/confess/;
13    
14    use lib '/home/dpavlin/stem-hr/';
15    use StemHR;
16    
17  use strict;  use strict;
18  use warnings;  use warnings;
# Line 108  sub _x { Line 112  sub _x {
112    
113  sub slogovi {  sub slogovi {
114          my $self = shift;          my $self = shift;
115          my $text = shift;          my $text = shift || confess "no text?";
116    
117          my $count = 2;          my $count = 3;
118          my $out = '';          my $out = '';
119    
120          foreach my $w ( split(/\W*\s+\W*/, $text ) ) {          foreach my $w ( split(/\W*\s+\W*/, $text ) ) {
# Line 130  sub slogovi { Line 134  sub slogovi {
134          return $out;          return $out;
135  }  }
136    
137    sub stem {
138            my $self = shift;
139            my $text = shift || confess "no text?";
140    
141            my $body = '';
142            foreach my $w ( split(/\W*\s+\W*/, $text ) ) {
143                    $body .= StemHR->stem( $w ) . ' ';
144            }
145    
146            return $body;
147    }
148    
149  1;  1;

Legend:
Removed from v.16  
changed lines
  Added in v.17

  ViewVC Help
Powered by ViewVC 1.1.26