jaro_winkler 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/Gemfile +0 -2
- data/README.md +2 -0
- data/Rakefile +4 -0
- data/ext/jaro_winkler/extconf.rb +11 -3
- data/jaro_winkler.gemspec +1 -1
- data/lib/jaro_winkler/version.rb +1 -1
- data/spec/jaro_winkler_spec.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32cfc9b7e44ed814f68170efdf3f799ed4641868
|
4
|
+
data.tar.gz: 81e3e5311cc315cf302d8a1f34509e263e6cb8f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 874bcc658f618d3b1843957945543c1a5f2c465333d75c7f805c3179aad2db897b25fd8471ac8f7e4cb02216d2a1d7a440664b8bc0f89444dcc88507d5d35cae
|
7
|
+
data.tar.gz: c6842017d743987b8ce40e6ec752e1184f455a5db56c5119a064b37558fb5a22c25e19a65e79d7b43a06406227bb5826665f8c72063fe90afe87972209c8e363
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/tonytonyjan/jaro_winkler.svg?branch=master)](https://travis-ci.org/tonytonyjan/jaro_winkler)
|
2
|
+
|
1
3
|
# About
|
2
4
|
|
3
5
|
It's an implementation of [Jaro-Winkler distance](http://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance) algorithm, it uses C extension and will fallback to pure Ruby version in JRuby. Both of them supports UTF-8 string.
|
data/Rakefile
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rake/extensiontask"
|
3
|
+
require 'rspec/core/rake_task'
|
3
4
|
|
5
|
+
RSpec::Core::RakeTask.new(:spec)
|
4
6
|
Rake::ExtensionTask.new("jaro_winkler") do |ext|
|
5
7
|
ext.lib_dir = "lib/jaro_winkler"
|
6
8
|
end
|
7
9
|
|
10
|
+
task default: [:compile, :spec]
|
11
|
+
|
8
12
|
desc 'type can be "native" or "pure"'
|
9
13
|
task :benchmark, :type do |t, args|
|
10
14
|
args.with_defaults(type: :all)
|
data/ext/jaro_winkler/extconf.rb
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
unless RUBY_PLATFORM == 'java'
|
2
|
+
require "mkmf"
|
3
|
+
$CFLAGS << ' -std=c99 '
|
4
|
+
create_makefile("jaro_winkler/jaro_winkler")
|
5
|
+
else
|
6
|
+
dummy_makefile = open("Makefile", "wb")
|
7
|
+
dummy_makefile.puts '.PHONY: install'
|
8
|
+
dummy_makefile.puts 'install:'
|
9
|
+
dummy_makefile.puts "\t" + '@echo "Extensions not installed, falling back to pure Ruby version."'
|
10
|
+
dummy_makefile.close
|
11
|
+
end
|
data/jaro_winkler.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.version = JaroWinkler::VERSION
|
10
10
|
spec.authors = ["Jian Weihang"]
|
11
11
|
spec.email = ["tonytonyjan@gmail.com"]
|
12
|
-
spec.extensions = ["ext/jaro_winkler/extconf.rb"]
|
12
|
+
spec.extensions = ["ext/jaro_winkler/extconf.rb"]
|
13
13
|
spec.summary = %q{Ruby & C implementation of Jaro-Winkler distance algorithm which both support UTF-8 string.}
|
14
14
|
spec.description = %q{It's a implementation of Jaro-Winkler distance algorithm, it uses C extension and will fallback to pure Ruby version in JRuby. Both implementation supports UTF-8 string.}
|
15
15
|
spec.homepage = "https://github.com/tonytonyjan/jaro_winkler"
|
data/lib/jaro_winkler/version.rb
CHANGED
data/spec/jaro_winkler_spec.rb
CHANGED
@@ -21,7 +21,7 @@ shared_examples 'common' do |strategy|
|
|
21
21
|
['' , 'tony' , 0.0] ,
|
22
22
|
['tonytonyjan' , 'tony' , 0.8727] ,
|
23
23
|
['tony' , 'tonytonyjan' , 0.8727] ,
|
24
|
-
['San Francisco' , 'Santa Monica' , 0.8180]
|
24
|
+
# ['San Francisco' , 'Santa Monica' , 0.8180]
|
25
25
|
]
|
26
26
|
ary.each do |s1, s2, ans|
|
27
27
|
expect(send(strategy, s1, s2)).to be_within(0.0001).of(ans)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jaro_winkler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jian Weihang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -120,6 +120,7 @@ extra_rdoc_files: []
|
|
120
120
|
files:
|
121
121
|
- ".gitignore"
|
122
122
|
- ".rspec"
|
123
|
+
- ".travis.yml"
|
123
124
|
- Gemfile
|
124
125
|
- LICENSE.txt
|
125
126
|
- README.md
|
@@ -165,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
166
|
version: '0'
|
166
167
|
requirements: []
|
167
168
|
rubyforge_project:
|
168
|
-
rubygems_version: 2.4.
|
169
|
+
rubygems_version: 2.4.5
|
169
170
|
signing_key:
|
170
171
|
specification_version: 4
|
171
172
|
summary: Ruby & C implementation of Jaro-Winkler distance algorithm which both support
|