levenshtein_ruby 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/levenshtein_ruby/levenshtein_ruby.c +2 -2
- data/levenshtein_ruby-0.1.1.gem +0 -0
- data/lib/levenshtein_ruby.rb +2 -2
- data/lib/levenshtein_ruby/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb379a79e2c3034d61394525d1034e5f11e03924
|
4
|
+
data.tar.gz: 1d77d454cc58877aeab23b7dd033e0138d7f69d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd378306f85623da0398464538a84b2f06914a8b5eaac9d8728c4727a93c1abfa8db4d01455c907bc50f94ba9ac16f62f346636bb3e5d9c959e99b01211ed0b9
|
7
|
+
data.tar.gz: 8081d6a580e61bdc2f371d8e3746db8753ce481aeafee0223a3fe271e5eb95ef626f3404d5ac31f29f4863d5bb53a10708f9417b3c8548c46255f17b06753acd
|
@@ -55,6 +55,6 @@ VALUE distance_func(VALUE self, VALUE s_word1, VALUE s_word2)
|
|
55
55
|
|
56
56
|
void Init_levenshtein_ruby()
|
57
57
|
{
|
58
|
-
cLevenshtein =
|
59
|
-
|
58
|
+
cLevenshtein = rb_define_module("Levenshtein");
|
59
|
+
rb_define_module_function(cLevenshtein, "distance", RUBY_METHOD_FUNC(distance_func), 2);
|
60
60
|
}
|
Binary file
|
data/lib/levenshtein_ruby.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require "levenshtein_ruby/version"
|
2
2
|
require "levenshtein_ruby/levenshtein_ruby"
|
3
3
|
|
4
|
-
|
5
|
-
def normalized_distance(a1, a2, threshold=nil, options={})
|
4
|
+
module Levenshtein
|
5
|
+
def self.normalized_distance(a1, a2, threshold=nil, options={})
|
6
6
|
size = [a1.size, a2.size].max
|
7
7
|
|
8
8
|
if a1.size == 0 and a2.size == 0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: levenshtein_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- meriy100
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- ext/levenshtein_ruby/extconf.rb
|
75
75
|
- ext/levenshtein_ruby/levenshtein_ruby.c
|
76
76
|
- levenshtein_ruby-0.1.0.gem
|
77
|
+
- levenshtein_ruby-0.1.1.gem
|
77
78
|
- levenshtein_ruby.gemspec
|
78
79
|
- lib/levenshtein_ruby.rb
|
79
80
|
- lib/levenshtein_ruby/version.rb
|