ruby-stemmer 0.0.3 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # $Id: Rakefile 19 2008-01-08 12:25:57Z aurelian $
2
+ # $Id: Rakefile 22 2008-05-09 23:49:43Z aurelian $
3
3
  #
4
4
 
5
5
  require 'rubygems'
@@ -25,7 +25,7 @@ PKG_FILES.exclude('*.so')
25
25
 
26
26
  spec = Gem::Specification.new do | s |
27
27
  s.name = 'ruby-stemmer'
28
- s.version = '0.0.3'
28
+ s.version = '0.5.1'
29
29
  s.summary = "Stemmer implementation to ruby using SnowBall API from libstemmer_c."
30
30
  s.description = <<-EOF
31
31
  Stemmer implementation to ruby using libstemmer_c.
@@ -52,3 +52,8 @@ task :default do
52
52
  puts "Ok"
53
53
  end
54
54
 
55
+ task :clean do
56
+ `rm -rf Makefile mkmf.log ruby-stemmer.o stemmer.bundle stemmer.so`
57
+ `cd libstemmer_c && make clean && cd ../`
58
+ end
59
+
data/extconf.rb CHANGED
@@ -1,14 +1,17 @@
1
1
  #
2
- # $Id: extconf.rb 19 2008-01-08 12:25:57Z aurelian $
2
+ # $Id: extconf.rb 21 2008-04-30 10:57:37Z aurelian $
3
3
  #
4
4
 
5
5
  require "mkmf"
6
6
 
7
- system "cd libstemmer_c; make; cd #{File.dirname(__FILE__)};"
7
+ system "cd libstemmer_c; make libstemmer.o; cd #{File.dirname(__FILE__)};"
8
8
 
9
- $CFLAGS += " -I#{File.dirname(__FILE__)}/libstemmer_c/include "
10
- $libs += " -L#{File.dirname(__FILE__)}/libstemmer_c -llibstemmer.o "
9
+ $CFLAGS += " -I#{File.dirname(__FILE__)}/libstemmer_c/include "
10
+ $libs += " -L#{File.dirname(__FILE__)}/libstemmer_c #{File.dirname(__FILE__)}/libstemmer_c/libstemmer.o "
11
11
 
12
- have_header("libstemmer.h")
13
- create_makefile("lingua/stemmer")
12
+ # dir_config("libstemmer")
13
+
14
+ if have_header("libstemmer.h") # && have_library('libstemmer')
15
+ create_makefile("lingua/stemmer")
16
+ end
14
17
 
@@ -1,5 +1,5 @@
1
1
  include mkinc.mak
2
- CFLAGS=-Iinclude
2
+ CFLAGS=-Iinclude -fPIC
3
3
  all: libstemmer.o stemwords
4
4
  libstemmer.o: $(snowball_sources:.c=.o)
5
5
  $(AR) -cru $@ $^
data/ruby-stemmer.c CHANGED
@@ -1,5 +1,5 @@
1
1
  //
2
- // $Id: ruby-stemmer.c 19 2008-01-08 12:25:57Z aurelian $
2
+ // $Id: ruby-stemmer.c 20 2008-04-29 20:59:56Z aurelian $
3
3
  //
4
4
 
5
5
  #include "ruby.h"
@@ -56,7 +56,7 @@ rb_stemmer_init(int argc, VALUE *argv, VALUE self) {
56
56
 
57
57
  stemmer = sb_stemmer_new( RSTRING(rlang)->ptr, RSTRING(renc)->ptr );
58
58
  if (stemmer == 0) {
59
- printf(">>[libstemmer]: got a null stemmer!\n");
59
+ // printf(">>[libstemmer]: got a null stemmer!\n");
60
60
  if (renc == 0 ) {
61
61
  rb_raise(rb_eRuntimeError, "Language %s not available for stemming", RSTRING(rlang)->ptr);
62
62
  exit(1);
data/test.rb CHANGED
@@ -1,12 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  #
4
- # $Id: test.rb 19 2008-01-08 12:25:57Z aurelian $
4
+ # $Id: test.rb 21 2008-04-30 10:57:37Z aurelian $
5
5
  #
6
6
 
7
7
  $kcode = "utf-8"
8
8
 
9
- require "lingua/stemmer"
9
+ require "stemmer.so"
10
+
11
+ #puts "installation".stem
10
12
 
11
13
  # puts ">>> test 1."
12
14
  stemmer = Lingua::Stemmer.new()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-stemmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aurelian Oancea
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-01-08 00:00:00 +02:00
12
+ date: 2008-05-10 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15