amatch 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ 2005-10-11 (0.2.2)
2
+ * Fixed a typo in extconf.rb that prohibitted compiling on
3
+ non-gcc compilers.
1
4
  2005-09-12 (0.2.1)
2
5
  * Bugfix: Wrong type for pattern length corrected. Thanks to David
3
6
  Heinemeier Hansson for reporting it.
data/InstalledFiles ADDED
@@ -0,0 +1,5 @@
1
+ /usr/local/stow/ruby/bin/
2
+ /usr/local/stow/ruby/bin/CVS
3
+ /usr/local/stow/ruby/bin/CVS
4
+ /usr/local/stow/ruby/bin/CVS
5
+ /usr/local/stow/ruby/lib/ruby/site_ruby/1.8/i686-linux/.
data/Rakefile CHANGED
@@ -41,7 +41,9 @@ end
41
41
 
42
42
  desc "Removing generated files"
43
43
  task :clean do
44
+ rm_rf 'doc'
44
45
  cd 'ext' do
46
+ rm_f 'amatch.o', :verbose => true
45
47
  ruby 'extconf.rb'
46
48
  sh "make distclean" if File.exist?('Makefile')
47
49
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
data/config.save ADDED
@@ -0,0 +1,12 @@
1
+ bin-dir=$prefix/bin
2
+ site-ruby=$prefix/lib/ruby/site_ruby/1.8
3
+ prefix=/usr/local/stow/ruby
4
+ ruby-path=/usr/local/stow/ruby/bin/ruby
5
+ make-prog=make
6
+ rb-dir=$site-ruby
7
+ without-ext=no
8
+ ruby-prog=/usr/local/stow/ruby/bin/ruby
9
+ site-ruby-common=$prefix/lib/ruby/site_ruby
10
+ std-ruby=$prefix/lib/ruby/1.8
11
+ data-dir=$prefix/share
12
+ so-dir=$prefix/lib/ruby/site_ruby/1.8/i686-linux
data/ext/amatch.bundle ADDED
Binary file
data/ext/extconf.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  #
2
- ## $Id: extconf.rb,v 1.2 2005/04/22 00:04:15 flori Exp $
2
+ ## $Id: extconf.rb,v 1.3 2005/11/10 05:06:26 flori Exp $
3
3
  #
4
4
 
5
5
  require 'mkmf'
6
6
  require 'rbconfig'
7
- if CONFIG['CC'] = 'gcc'
7
+ if CONFIG['CC'] == 'gcc'
8
8
  CONFIG['CC'] = 'gcc -Wall '
9
9
  end
10
10
  create_makefile 'amatch'
data/ext/tags ADDED
@@ -0,0 +1,24 @@
1
+ CAST2FLOAT amatch.c /^#define CAST2FLOAT(obj) \\$/
2
+ DEF_ALLOCATOR amatch.c /^#define DEF_ALLOCATOR(type) /
3
+ DEF_CONSTRUCTOR amatch.c /^#define DEF_CONSTRUCTOR(klass, type) /
4
+ DEF_ITERATE_STRINGS amatch.c /^#define DEF_ITERATE_STRINGS(type) /
5
+ DEF_PATTERN_ACCESSOR amatch.c /^#define DEF_PATTERN_ACCESSOR(type) /
6
+ DEF_RB_FREE amatch.c /^#define DEF_RB_FREE(klass, type) /
7
+ DEF_RB_READER amatch.c /^#define DEF_RB_READER(type, function, name, conver/
8
+ DEF_RB_WRITER amatch.c /^#define DEF_RB_WRITER(type, function, name, vtype,/
9
+ FLOAT2C amatch.c /^#define FLOAT2C(obj) RFLOAT(obj)->value$/
10
+ GET_STRUCT amatch.c /^#define GET_STRUCT(klass) \\$/
11
+ Init_amatch amatch.c /^void Init_amatch()$/
12
+ Levenshtein_search amatch.c /^static VALUE Levenshtein_search(Levenshtein *amatc/
13
+ PairDistance_match amatch.c /^static VALUE PairDistance_match($/
14
+ amatch_LongestSubstring amatch.c /^static VALUE amatch_LongestSubstring(General *amat/
15
+ hamming amatch.c /^static VALUE hamming(General *amatch, VALUE string/
16
+ longest_subsequence amatch.c /^static VALUE longest_subsequence(General *amatch, /
17
+ rb_Levenshtein_initialize amatch.c /^static VALUE rb_Levenshtein_initialize(VALUE self,/
18
+ rb_Levenshtein_search amatch.c /^static VALUE rb_Levenshtein_search(VALUE self, VAL/
19
+ rb_str_Levenshtein_match amatch.c /^static VALUE rb_str_Levenshtein_match(VALUE self, /
20
+ rb_str_Levenshtein_search amatch.c /^static VALUE rb_str_Levenshtein_search(VALUE self,/
21
+ rb_str_hamming amatch.c /^static VALUE rb_str_hamming(VALUE self, VALUE stri/
22
+ rb_str_longest_subsequence amatch.c /^static VALUE rb_str_longest_subsequence(VALUE self/
23
+ rb_str_longest_substring amatch.c /^static VALUE rb_str_longest_substring(VALUE self, /
24
+ rb_str_pair_distance amatch.c /^static VALUE rb_str_pair_distance(VALUE self, VALU/
data/foo.rb ADDED
@@ -0,0 +1,9 @@
1
+ $:.unshift 'ext'
2
+
3
+ require 'amatch'
4
+
5
+ a = "A" * "lost this fantasy, this fantasy, this fantasy, this fantasy, this fantasy, this fantasy\r\n\r\nGood love Neat work\r\n\r\nSuper job Fancy work\r\n\r\nPants job Cool work".size
6
+ b = "A" * "lost\r\n\r\nGood love Neat work\r\n\r\nSuper job Fancy work\r\n\r\nPants job Cool work".size
7
+ #p a.levenshtein_similar(b)
8
+ amatch = Amatch::Levenshtein.new(a)
9
+ amatch.similar(b)
@@ -12,6 +12,12 @@ class TC_Levenshtein < Test::Unit::TestCase
12
12
  @long = Levenshtein.new('A' * 160)
13
13
  end
14
14
 
15
+ def test_long
16
+ a = "lost this fantasy, this fantasy, this fantasy, this fantasy, this fantasy, this fantasy\r\n\r\nGood love Neat work\r\n\r\nSuper job Fancy work\r\n\r\nPants job Cool work"
17
+ b = "lost\r\n\r\nGood love Neat work\r\n\r\nSuper job Fancy work\r\n\r\nPants job Cool work"
18
+ p a.levenshtein_similar b
19
+ end
20
+
15
21
  def test_match
16
22
  assert_equal 4, @simple.match('')
17
23
  assert_equal 0, @simple.match('test')
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: amatch
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.1
7
- date: 2005-09-12 00:00:00 +02:00
6
+ version: 0.2.2
7
+ date: 2005-11-10 00:00:00 +01:00
8
8
  summary: Approximate String Matching library
9
9
  require_paths:
10
10
  - ext
@@ -31,28 +31,33 @@ cert_chain:
31
31
  authors:
32
32
  - Florian Frank
33
33
  files:
34
- - README.en
35
- - CHANGES
36
- - GPL
34
+ - InstalledFiles
37
35
  - bin
38
- - Rakefile
39
- - VERSION
40
36
  - install.rb
37
+ - GPL
41
38
  - ext
39
+ - Rakefile
40
+ - VERSION
42
41
  - tests
42
+ - foo.rb
43
+ - CHANGES
44
+ - config.save
45
+ - README.en
43
46
  - bin/agrep.rb
44
- - ext/MANIFEST
45
- - ext/amatch.c
47
+ - ext/pair.h
46
48
  - ext/extconf.rb
49
+ - ext/amatch.bundle
47
50
  - ext/pair.c
48
- - ext/pair.h
49
- - tests/runner.rb
51
+ - ext/tags
52
+ - ext/MANIFEST
53
+ - ext/amatch.c
54
+ - tests/test_longest_substring.rb
50
55
  - tests/test_hamming.rb
56
+ - tests/test_sellers.rb
51
57
  - tests/test_levenshtein.rb
52
- - tests/test_longest_subsequence.rb
53
- - tests/test_longest_substring.rb
54
58
  - tests/test_pair_distance.rb
55
- - tests/test_sellers.rb
59
+ - tests/runner.rb
60
+ - tests/test_longest_subsequence.rb
56
61
  test_files:
57
62
  - tests/runner.rb
58
63
  rdoc_options: