ruby-stemmer 0.6.4 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -5,7 +5,7 @@ Ruby-Stemmer exposes SnowBall API to Ruby.
5
5
  This package includes libstemmer_c library released under BSD licence
6
6
  and available for free at: http://snowball.tartarus.org/dist/libstemmer_c.tgz.
7
7
 
8
- For more details about libstemmer_c please visit http://snowball.tartarus.org.
8
+ For more details about libstemmer_c please visit the {SnowBall website}[http://snowball.tartarus.org].
9
9
 
10
10
  == Usage
11
11
 
@@ -33,8 +33,8 @@ For more details about libstemmer_c please visit http://snowball.tartarus.org.
33
33
 
34
34
  === More details
35
35
 
36
- * RDoc: http://ruby-stemmer.rubyforge.org/ruby-stemmer
37
- * Test: http://github.com/aurelian/ruby-stemmer/blob/master/test/lingua/test_stemmer.rb
36
+ * Complete API in {RDoc format}[http://ruby-stemmer.rubyforge.org/ruby-stemmer]
37
+ * More usage on the {test file}[http://github.com/aurelian/ruby-stemmer/blob/master/test/lingua/test_stemmer.rb]
38
38
 
39
39
  == Install
40
40
 
@@ -62,13 +62,13 @@ For further reference on stem vs. root, please check wikipedia articles on the t
62
62
 
63
63
  == TODO
64
64
 
65
- * Open issues: http://github.com/aurelian/ruby-stemmer/issues
65
+ * {Open issues}[http://github.com/aurelian/ruby-stemmer/issues]
66
66
  * Windows Support -> see rake-compiler to cross-compile a dll (with the gem and nokogiri Rakefile).
67
67
 
68
68
  == Note on Patches/Pull Requests
69
69
 
70
- * Fork the project from github: http://github.com/aurelian/ruby-stemmer
71
- * Make your feature addition or bug fix: http://github.com/aurelian/ruby-stemmer/issues
70
+ * Fork the project from {github}[http://github.com/aurelian/ruby-stemmer]
71
+ * Make your feature addition or {bug fix}[http://github.com/aurelian/ruby-stemmer/issues]
72
72
  * Add tests for it. This is important so I don't break it in a
73
73
  future version unintentionally.
74
74
  * Commit, do not mess with rakefile, version, or history.
@@ -79,15 +79,15 @@ For further reference on stem vs. root, please check wikipedia articles on the t
79
79
 
80
80
  == Alternative Stemmers for Ruby
81
81
 
82
- * stemmer4r: http://rubyforge.org/projects/stemmer4r (ext)
83
- * fast-stemmer: http://github.com/romanbsd/fast-stemmer (ext)
84
- * stemmer: http://rubyforge.org/projects/stemmer (pure ruby)
85
- * uea-stemmer: http://github.com/ealdent/uea-stemmer
82
+ * {stemmer4r}[http://rubyforge.org/projects/stemmer4r] (ext)
83
+ * {fast-stemmer}[http://github.com/romanbsd/fast-stemmer] (ext)
84
+ * {uea-stemmer}[http://github.com/ealdent/uea-stemmer] (ext)
85
+ * {stemmer}[http://rubyforge.org/projects/stemmer] (pure ruby)
86
86
  * [add yours]
87
87
 
88
88
  == Copyright
89
89
 
90
- Copyright (c) 2009 Aurelian Oancea. See MIT-LICENSE for details.
90
+ Copyright (c) 2008,2009 {Aurelian Oancea}[http://locknet.ro]. See MIT-LICENSE for details.
91
91
 
92
92
  == Contributors
93
93
 
@@ -96,5 +96,5 @@ Copyright (c) 2009 Aurelian Oancea. See MIT-LICENSE for details.
96
96
 
97
97
  == Real life usage
98
98
 
99
- * http://planet33.ru is using Ruby-Stemmer together with Classifier (http://github.com/yury/classifier) to automatically rate places based on users comments
99
+ * http://planet33.ru is using Ruby-Stemmer together with {Classifier}[http://github.com/yury/classifier] to automatically rate places based on users comments
100
100
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.4
1
+ 0.7.0
@@ -1,14 +1,25 @@
1
- ENV['RC_ARCHS'] = '' if RUBY_PLATFORM =~ /universal-darwin/
1
+ ENV['RC_ARCHS'] = '' if RUBY_PLATFORM =~ /darwin/
2
2
  require "mkmf"
3
3
 
4
4
  ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
5
5
  LIBSTEMMER = File.join(ROOT, 'libstemmer_c')
6
6
 
7
7
  # build libstemmer_c
8
+ # FreeBSD make is gmake
8
9
  make= (RUBY_PLATFORM =~ /freebsd/)? 'gmake' : 'make'
9
- ENV['ARCHFLAGS']= "-arch #{Config::CONFIG['host_cpu']}" if RUBY_PLATFORM =~ /darwin/
10
- ENV['ARCHFLAGS']= "-arch x86_64" if Config::CONFIG['host_cpu'] == 'i686' && RUBY_PLATFORM =~ /darwin/
10
+ # MacOS architecture mess up
11
+ if RUBY_PLATFORM =~ /darwin/
12
+ begin
13
+ ENV['ARCHFLAGS']= "-arch " + %x[file #{File.expand_path(File.join(Config::CONFIG['bindir'], Config::CONFIG['RUBY_INSTALL_NAME']))}].strip!.match(/executable (.+)$/)[1] unless ENV['ARCHFLAGS'].nil?
14
+ rescue
15
+ $stderr << "Failed to get your ruby executable architecture.\n"
16
+ $stderr << "Please specify one using $ARCHFLAGS environment variable.\n"
17
+ exit
18
+ end
19
+ end
20
+ # make this stuff
11
21
  system "cd #{LIBSTEMMER}; #{make} libstemmer.o; cd #{ROOT};"
22
+ exit unless $? == 0
12
23
 
13
24
  $CFLAGS += " -I#{File.join(LIBSTEMMER, 'include')} "
14
25
  $libs += " -L#{LIBSTEMMER} #{File.join(LIBSTEMMER, 'libstemmer.o')} "
@@ -19,6 +19,6 @@ module Lingua
19
19
  end
20
20
 
21
21
  class Stemmer
22
- VERSION = File.read(File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "VERSION")))
22
+ VERSION = File.read(File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "VERSION"))).strip!
23
23
  end
24
24
  end
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.6.4
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aurelian Oancea
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-10-28 00:00:00 +01:00
13
+ date: 2009-10-29 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -29,7 +29,6 @@ files:
29
29
  - VERSION
30
30
  - ext/lingua/extconf.rb
31
31
  - ext/lingua/stemmer.c
32
- - lib/lingua.rb
33
32
  - lib/lingua/stemmer.rb
34
33
  - libstemmer_c/MANIFEST
35
34
  - libstemmer_c/Makefile
data/lib/lingua.rb DELETED
File without changes