taxamatch_rb 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +3 -0
- data/.rubocop.yml +9 -0
- data/.travis.yml +10 -0
- data/CHANGELOG +3 -0
- data/CODE_OF_CONDUCT.md +31 -0
- data/Gemfile +2 -17
- data/LICENSE.txt +21 -0
- data/README.md +53 -26
- data/Rakefile +11 -40
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/taxamatch_rb/base.rb +154 -0
- data/lib/taxamatch_rb/version.rb +7 -0
- data/lib/taxamatch_rb.rb +12 -172
- data/taxamatch_rb.gemspec +30 -57
- metadata +124 -48
- data/Gemfile.lock +0 -86
- data/LICENSE +0 -20
- data/Makefile +0 -157
- data/VERSION +0 -1
- data/spec/spec.opts +0 -1
- data/spec/spec_helper.rb +0 -22
- data/spec/taxamatch_rb_spec.rb +0 -406
- data/spec/taxamatch_test.txt +0 -46
data/lib/taxamatch_rb.rb
CHANGED
@@ -1,176 +1,16 @@
|
|
1
|
-
# encoding:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
if RUBY_VERSION < '1.9.1'
|
13
|
-
raise 'IMPORTANT: Parsley-store gem requires ruby >= 1.9.1'
|
1
|
+
# encoding: utf-8
|
2
|
+
require "taxamatch_rb/version"
|
3
|
+
require "damerau-levenshtein"
|
4
|
+
require "taxamatch_rb/base"
|
5
|
+
require "taxamatch_rb/atomizer"
|
6
|
+
require "taxamatch_rb/normalizer"
|
7
|
+
require "taxamatch_rb/phonetizer"
|
8
|
+
require "taxamatch_rb/authmatch"
|
9
|
+
|
10
|
+
if RUBY_VERSION < "1.9.1"
|
11
|
+
fail "IMPORTANT: taxamatch_rb gem requires ruby >= 1.9.1"
|
14
12
|
end
|
15
13
|
|
14
|
+
# Taxamatch provides fuzzy comparison between two scientific names
|
16
15
|
module Taxamatch
|
17
|
-
|
18
|
-
class Base
|
19
|
-
|
20
|
-
def initialize
|
21
|
-
@parser = Taxamatch::Atomizer.new
|
22
|
-
@dlm = DamerauLevenshtein
|
23
|
-
end
|
24
|
-
|
25
|
-
|
26
|
-
# takes two scientific names and returns true
|
27
|
-
# if names match and false if they don't
|
28
|
-
def taxamatch(str1, str2, return_boolean = true)
|
29
|
-
preparsed_1 = @parser.parse(str1)
|
30
|
-
preparsed_2 = @parser.parse(str2)
|
31
|
-
match = taxamatch_preparsed(preparsed_1, preparsed_2) rescue nil
|
32
|
-
return_boolean ? (!!match && match['match']) : match
|
33
|
-
end
|
34
|
-
|
35
|
-
# takes two hashes of parsed scientific names, analyses them and
|
36
|
-
# returns back this function is useful when species strings are preparsed.
|
37
|
-
def taxamatch_preparsed(preparsed_1, preparsed_2)
|
38
|
-
result = nil
|
39
|
-
if preparsed_1[:uninomial] && preparsed_2[:uninomial]
|
40
|
-
result = match_uninomial(preparsed_1, preparsed_2)
|
41
|
-
end
|
42
|
-
if preparsed_1[:genus] && preparsed_2[:genus]
|
43
|
-
result = match_multinomial(preparsed_1, preparsed_2)
|
44
|
-
end
|
45
|
-
if result && result['match']
|
46
|
-
result['match'] = match_authors(preparsed_1, preparsed_2) == -1 ?
|
47
|
-
false : true
|
48
|
-
end
|
49
|
-
return result
|
50
|
-
end
|
51
|
-
|
52
|
-
def match_uninomial(preparsed_1, preparsed_2)
|
53
|
-
match_genera(preparsed_1[:uninomial], preparsed_2[:uninomial])
|
54
|
-
end
|
55
|
-
|
56
|
-
def match_multinomial(preparsed_1, preparsed_2)
|
57
|
-
gen_match = match_genera(preparsed_1[:genus], preparsed_2[:genus])
|
58
|
-
sp_match = match_species(preparsed_1[:species], preparsed_2[:species])
|
59
|
-
total_length = preparsed_1[:genus][:string].size +
|
60
|
-
preparsed_2[:genus][:string].size +
|
61
|
-
preparsed_1[:species][:string].size +
|
62
|
-
preparsed_2[:species][:string].size
|
63
|
-
if preparsed_1[:infraspecies] && preparsed_2[:infraspecies]
|
64
|
-
infrasp_match = match_species(preparsed_1[:infraspecies][0],
|
65
|
-
preparsed_2[:infraspecies][0])
|
66
|
-
total_length += preparsed_1[:infraspecies][0][:string].size +
|
67
|
-
preparsed_2[:infraspecies][0][:string].size
|
68
|
-
match_hash = match_matches(gen_match, sp_match, infrasp_match)
|
69
|
-
elsif (preparsed_1[:infraspecies] && !preparsed_2[:infraspecies]) ||
|
70
|
-
(!preparsed_1[:infraspecies] && preparsed_2[:infraspecies])
|
71
|
-
match_hash = { 'match' => false,
|
72
|
-
'edit_distance' => 5,
|
73
|
-
'phonetic_match' => false }
|
74
|
-
total_length += preparsed_1[:infraspecies] ?
|
75
|
-
preparsed_1[:infraspecies][0][:string].size :
|
76
|
-
preparsed_2[:infraspecies][0][:string].size
|
77
|
-
else
|
78
|
-
match_hash = match_matches(gen_match, sp_match)
|
79
|
-
end
|
80
|
-
match_hash.merge({ 'score' =>
|
81
|
-
(1 - match_hash['edit_distance']/(total_length/2)) })
|
82
|
-
match_hash
|
83
|
-
end
|
84
|
-
|
85
|
-
def match_genera(genus1, genus2, opts = {})
|
86
|
-
genus1_length = genus1[:normalized].size
|
87
|
-
genus2_length = genus2[:normalized].size
|
88
|
-
opts = { with_phonetic_match: true }.merge(opts)
|
89
|
-
min_length = [genus1_length, genus2_length].min
|
90
|
-
unless opts[:with_phonetic_match]
|
91
|
-
genus1[:phonetized] = 'A'
|
92
|
-
genus2[:phonetized] = 'B'
|
93
|
-
end
|
94
|
-
match = false
|
95
|
-
ed = @dlm.distance(genus1[:normalized],
|
96
|
-
genus2[:normalized], 1, 3) #TODO put block = 2
|
97
|
-
return { 'edit_distance' => ed,
|
98
|
-
'phonetic_match' => false,
|
99
|
-
'match' => false } if ed/min_length.to_f > 0.2
|
100
|
-
return { 'edit_distance' => ed,
|
101
|
-
'phonetic_match' => true,
|
102
|
-
'match' => true } if genus1[:phonetized] == genus2[:phonetized]
|
103
|
-
|
104
|
-
match = true if ed <= 3 && (min_length > ed * 2) &&
|
105
|
-
(ed < 2 || genus1[0] == genus2[0])
|
106
|
-
{ 'edit_distance' => ed, 'match' => match, 'phonetic_match' => false }
|
107
|
-
end
|
108
|
-
|
109
|
-
def match_species(sp1, sp2, opts = {})
|
110
|
-
sp1_length = sp1[:normalized].size
|
111
|
-
sp2_length = sp2[:normalized].size
|
112
|
-
opts = { with_phonetic_match: true }.merge(opts)
|
113
|
-
min_length = [sp1_length, sp2_length].min
|
114
|
-
unless opts[:with_phonetic_match]
|
115
|
-
sp1[:phonetized] = 'A'
|
116
|
-
sp2[:phonetized] = 'B'
|
117
|
-
end
|
118
|
-
sp1[:phonetized] = Taxamatch::Phonetizer.normalize_ending sp1[:phonetized]
|
119
|
-
sp2[:phonetized] = Taxamatch::Phonetizer.normalize_ending sp2[:phonetized]
|
120
|
-
match = false
|
121
|
-
ed = @dlm.distance(sp1[:normalized],
|
122
|
-
sp2[:normalized], 1, 4) #TODO put block 4
|
123
|
-
return { 'edit_distance' => ed,
|
124
|
-
'phonetic_match' => false,
|
125
|
-
'match' => false } if ed/min_length.to_f > 0.3334
|
126
|
-
return {'edit_distance' => ed,
|
127
|
-
'phonetic_match' => true,
|
128
|
-
'match' => true} if sp1[:phonetized] == sp2[:phonetized]
|
129
|
-
|
130
|
-
match = true if ed <= 4 &&
|
131
|
-
(min_length >= ed * 2) &&
|
132
|
-
(ed < 2 || sp1[:normalized][0] == sp2[:normalized][0]) &&
|
133
|
-
(ed < 4 || sp1[:normalized][0...3] == sp2[:normalized][0...3])
|
134
|
-
{ 'edit_distance' => ed, 'match' => match, 'phonetic_match' => false }
|
135
|
-
end
|
136
|
-
|
137
|
-
def match_authors(preparsed_1, preparsed_2)
|
138
|
-
p1 = { normalized_authors: [], years: [] }
|
139
|
-
p2 = { normalized_authors: [], years: [] }
|
140
|
-
if preparsed_1[:infraspecies] || preparsed_2[:infraspecies]
|
141
|
-
p1 = preparsed_1[:infraspecies].last if preparsed_1[:infraspecies]
|
142
|
-
p2 = preparsed_2[:infraspecies].last if preparsed_2[:infraspecies]
|
143
|
-
elsif preparsed_1[:species] || preparsed_2[:species]
|
144
|
-
p1 = preparsed_1[:species] if preparsed_1[:species]
|
145
|
-
p2 = preparsed_2[:species] if preparsed_2[:species]
|
146
|
-
elsif preparsed_1[:uninomial] && preparsed_2[:uninomial]
|
147
|
-
p1 = preparsed_1[:uninomial]
|
148
|
-
p2 = preparsed_2[:uninomial]
|
149
|
-
end
|
150
|
-
au1 = p1[:normalized_authors]
|
151
|
-
au2 = p2[:normalized_authors]
|
152
|
-
yr1 = p1[:years]
|
153
|
-
yr2 = p2[:years]
|
154
|
-
return 0 if au1.empty? || au2.empty?
|
155
|
-
score = Taxamatch::Authmatch.authmatch(au1, au2, yr1, yr2)
|
156
|
-
score == 0 ? -1 : 1
|
157
|
-
end
|
158
|
-
|
159
|
-
def match_matches(genus_match, species_match, infraspecies_match = nil)
|
160
|
-
match = species_match
|
161
|
-
if infraspecies_match
|
162
|
-
match['edit_distance'] += infraspecies_match['edit_distance']
|
163
|
-
match['match'] &&= infraspecies_match['match']
|
164
|
-
match['phonetic_match'] &&= infraspecies_match['phonetic_match']
|
165
|
-
end
|
166
|
-
match['edit_distance'] += genus_match['edit_distance']
|
167
|
-
if match['edit_distance'] > (infraspecies_match ? 6 : 4)
|
168
|
-
match['match'] = false
|
169
|
-
end
|
170
|
-
match['match'] &&= genus_match['match']
|
171
|
-
match['phonetic_match'] &&= genus_match['phonetic_match']
|
172
|
-
match
|
173
|
-
end
|
174
|
-
|
175
|
-
end
|
176
16
|
end
|
data/taxamatch_rb.gemspec
CHANGED
@@ -1,62 +1,35 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'taxamatch_rb/version'
|
5
5
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "taxamatch_rb"
|
8
|
+
gem.version = Taxamatch::VERSION
|
9
|
+
gem.authors = ["Dmitry Mozzherin"]
|
10
|
+
gem.email = ["dmozzherin@gmail.com"]
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"LICENSE",
|
17
|
-
"README.md"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
"CHANGELOG",
|
21
|
-
"Gemfile",
|
22
|
-
"Gemfile.lock",
|
23
|
-
"LICENSE",
|
24
|
-
"Makefile",
|
25
|
-
"README.md",
|
26
|
-
"Rakefile",
|
27
|
-
"VERSION",
|
28
|
-
"lib/taxamatch_rb.rb",
|
29
|
-
"lib/taxamatch_rb/atomizer.rb",
|
30
|
-
"lib/taxamatch_rb/authmatch.rb",
|
31
|
-
"lib/taxamatch_rb/normalizer.rb",
|
32
|
-
"lib/taxamatch_rb/phonetizer.rb",
|
33
|
-
"spec/spec.opts",
|
34
|
-
"spec/spec_helper.rb",
|
35
|
-
"spec/taxamatch_rb_spec.rb",
|
36
|
-
"spec/taxamatch_test.txt",
|
37
|
-
"taxamatch_rb.gemspec"
|
38
|
-
]
|
39
|
-
s.homepage = "http://github.com/GlobalNamesArchitecture/taxamatch_rb"
|
40
|
-
s.require_paths = ["lib"]
|
41
|
-
s.rubygems_version = "1.8.25"
|
42
|
-
s.summary = "Implementation of Tony Rees Taxamatch algorithms"
|
12
|
+
gem.summary = %q{Fuzzy matching of scientific names}
|
13
|
+
gem.description = "The purpose of Taxamatch gem is to facilitate fuzzy" \
|
14
|
+
"comparison of two scientific name renderings to find" \
|
15
|
+
"out if they actually point to the same scientific name."
|
16
|
+
gem.homepage = "https://github.com/GlobalNamesArchitecture/taxamatch_rb"
|
17
|
+
gem.license = "MIT"
|
43
18
|
|
44
|
-
|
45
|
-
|
19
|
+
gem.files = `git ls-files -z`.split("\x0").
|
20
|
+
reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
gem.bindir = "exe"
|
22
|
+
gem.executables = gem.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
gem.require_paths = ["lib"]
|
46
24
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
s.add_runtime_dependency(%q<json>, ["~> 1.7.7"])
|
51
|
-
else
|
52
|
-
s.add_dependency(%q<biodiversity>, ["~> 3.1.0"])
|
53
|
-
s.add_dependency(%q<damerau-levenshtein>, ["~> 0.5.4"])
|
54
|
-
s.add_dependency(%q<json>, ["~> 1.7.7"])
|
55
|
-
end
|
56
|
-
else
|
57
|
-
s.add_dependency(%q<biodiversity>, ["~> 3.1.0"])
|
58
|
-
s.add_dependency(%q<damerau-levenshtein>, ["~> 0.5.4"])
|
59
|
-
s.add_dependency(%q<json>, ["~> 1.7.7"])
|
60
|
-
end
|
61
|
-
end
|
25
|
+
gem.add_runtime_dependency "biodiversity", "~> 3.1"
|
26
|
+
gem.add_runtime_dependency "damerau-levenshtein", "~> 1.0"
|
27
|
+
gem.add_runtime_dependency "json", "~> 1.8"
|
62
28
|
|
29
|
+
gem.add_development_dependency "bundler", "~> 1.6"
|
30
|
+
gem.add_development_dependency "rake", "~> 10.4"
|
31
|
+
gem.add_development_dependency "rspec", "~> 3.2"
|
32
|
+
gem.add_development_dependency "cucumber", "~> 2.0"
|
33
|
+
gem.add_development_dependency "coveralls", "~> 0.8"
|
34
|
+
gem.add_development_dependency "rubocop", "~> 0.30"
|
35
|
+
end
|
metadata
CHANGED
@@ -1,116 +1,192 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taxamatch_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Dmitry Mozzherin
|
9
8
|
autorequire:
|
10
|
-
bindir:
|
9
|
+
bindir: exe
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-04-21 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: biodiversity
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.1
|
19
|
+
version: '3.1'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.1
|
26
|
+
version: '3.1'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: damerau-levenshtein
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0
|
33
|
+
version: '1.0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0
|
40
|
+
version: '1.0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: json
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- - ~>
|
45
|
+
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
47
|
+
version: '1.8'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- - ~>
|
52
|
+
- - "~>"
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
62
|
-
|
63
|
-
|
64
|
-
|
54
|
+
version: '1.8'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.6'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.4'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.4'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.2'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: cucumber
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: coveralls
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.8'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.8'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.30'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.30'
|
139
|
+
description: The purpose of Taxamatch gem is to facilitate fuzzycomparison of two
|
140
|
+
scientific name renderings to findout if they actually point to the same scientific
|
141
|
+
name.
|
142
|
+
email:
|
143
|
+
- dmozzherin@gmail.com
|
65
144
|
executables: []
|
66
145
|
extensions: []
|
67
|
-
extra_rdoc_files:
|
68
|
-
- LICENSE
|
69
|
-
- README.md
|
146
|
+
extra_rdoc_files: []
|
70
147
|
files:
|
148
|
+
- ".gitignore"
|
149
|
+
- ".rspec"
|
150
|
+
- ".rubocop.yml"
|
151
|
+
- ".travis.yml"
|
71
152
|
- CHANGELOG
|
153
|
+
- CODE_OF_CONDUCT.md
|
72
154
|
- Gemfile
|
73
|
-
-
|
74
|
-
- LICENSE
|
75
|
-
- Makefile
|
155
|
+
- LICENSE.txt
|
76
156
|
- README.md
|
77
157
|
- Rakefile
|
78
|
-
-
|
158
|
+
- bin/console
|
159
|
+
- bin/setup
|
79
160
|
- lib/taxamatch_rb.rb
|
80
161
|
- lib/taxamatch_rb/atomizer.rb
|
81
162
|
- lib/taxamatch_rb/authmatch.rb
|
163
|
+
- lib/taxamatch_rb/base.rb
|
82
164
|
- lib/taxamatch_rb/normalizer.rb
|
83
165
|
- lib/taxamatch_rb/phonetizer.rb
|
84
|
-
-
|
85
|
-
- spec/spec_helper.rb
|
86
|
-
- spec/taxamatch_rb_spec.rb
|
87
|
-
- spec/taxamatch_test.txt
|
166
|
+
- lib/taxamatch_rb/version.rb
|
88
167
|
- taxamatch_rb.gemspec
|
89
|
-
homepage:
|
90
|
-
licenses:
|
168
|
+
homepage: https://github.com/GlobalNamesArchitecture/taxamatch_rb
|
169
|
+
licenses:
|
170
|
+
- MIT
|
171
|
+
metadata: {}
|
91
172
|
post_install_message:
|
92
173
|
rdoc_options: []
|
93
174
|
require_paths:
|
94
175
|
- lib
|
95
176
|
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
-
none: false
|
97
177
|
requirements:
|
98
|
-
- -
|
178
|
+
- - ">="
|
99
179
|
- !ruby/object:Gem::Version
|
100
180
|
version: '0'
|
101
|
-
segments:
|
102
|
-
- 0
|
103
|
-
hash: 1177825761849915556
|
104
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
182
|
requirements:
|
107
|
-
- -
|
183
|
+
- - ">="
|
108
184
|
- !ruby/object:Gem::Version
|
109
185
|
version: '0'
|
110
186
|
requirements: []
|
111
187
|
rubyforge_project:
|
112
|
-
rubygems_version:
|
188
|
+
rubygems_version: 2.4.5
|
113
189
|
signing_key:
|
114
|
-
specification_version:
|
115
|
-
summary:
|
190
|
+
specification_version: 4
|
191
|
+
summary: Fuzzy matching of scientific names
|
116
192
|
test_files: []
|
data/Gemfile.lock
DELETED
@@ -1,86 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
activesupport (3.2.13)
|
5
|
-
i18n (= 0.6.1)
|
6
|
-
multi_json (~> 1.0)
|
7
|
-
biodiversity (3.1.0)
|
8
|
-
parallel
|
9
|
-
parallel (~> 0.6)
|
10
|
-
rake (~> 10.0)
|
11
|
-
treetop
|
12
|
-
treetop (~> 1.4)
|
13
|
-
unicode_utils (~> 1.4)
|
14
|
-
builder (3.2.0)
|
15
|
-
columnize (0.3.6)
|
16
|
-
cucumber (1.3.1)
|
17
|
-
builder (>= 2.1.2)
|
18
|
-
diff-lcs (>= 1.1.3)
|
19
|
-
gherkin (~> 2.12.0)
|
20
|
-
multi_json (~> 1.3)
|
21
|
-
damerau-levenshtein (0.5.4)
|
22
|
-
debugger (1.5.0)
|
23
|
-
columnize (>= 0.3.1)
|
24
|
-
debugger-linecache (~> 1.2.0)
|
25
|
-
debugger-ruby_core_source (~> 1.2.0)
|
26
|
-
debugger-linecache (1.2.0)
|
27
|
-
debugger-ruby_core_source (1.2.0)
|
28
|
-
diff-lcs (1.2.4)
|
29
|
-
gherkin (2.12.0)
|
30
|
-
multi_json (~> 1.3)
|
31
|
-
git (1.2.5)
|
32
|
-
i18n (0.6.1)
|
33
|
-
jeweler (1.8.4)
|
34
|
-
bundler (~> 1.0)
|
35
|
-
git (>= 1.2.5)
|
36
|
-
rake
|
37
|
-
rdoc
|
38
|
-
json (1.7.7)
|
39
|
-
metaclass (0.0.1)
|
40
|
-
mocha (0.13.3)
|
41
|
-
metaclass (~> 0.0.1)
|
42
|
-
multi_json (1.7.3)
|
43
|
-
parallel (0.7.0)
|
44
|
-
polyglot (0.3.3)
|
45
|
-
rake (10.0.4)
|
46
|
-
rake-compiler (0.8.3)
|
47
|
-
rake
|
48
|
-
rdoc (4.0.1)
|
49
|
-
json (~> 1.4)
|
50
|
-
rspec (2.13.0)
|
51
|
-
rspec-core (~> 2.13.0)
|
52
|
-
rspec-expectations (~> 2.13.0)
|
53
|
-
rspec-mocks (~> 2.13.0)
|
54
|
-
rspec-core (2.13.1)
|
55
|
-
rspec-expectations (2.13.0)
|
56
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
57
|
-
rspec-mocks (2.13.1)
|
58
|
-
ruby-prof (0.13.0)
|
59
|
-
shoulda (3.5.0)
|
60
|
-
shoulda-context (~> 1.0, >= 1.0.1)
|
61
|
-
shoulda-matchers (>= 1.4.1, < 3.0)
|
62
|
-
shoulda-context (1.1.1)
|
63
|
-
shoulda-matchers (2.1.0)
|
64
|
-
activesupport (>= 3.0.0)
|
65
|
-
treetop (1.4.14)
|
66
|
-
polyglot
|
67
|
-
polyglot (>= 0.3.1)
|
68
|
-
unicode_utils (1.4.0)
|
69
|
-
|
70
|
-
PLATFORMS
|
71
|
-
ruby
|
72
|
-
|
73
|
-
DEPENDENCIES
|
74
|
-
biodiversity (~> 3.1.0)
|
75
|
-
bundler (~> 1.3)
|
76
|
-
cucumber (~> 1.3)
|
77
|
-
damerau-levenshtein (~> 0.5.4)
|
78
|
-
debugger (~> 1.5)
|
79
|
-
jeweler (~> 1.8)
|
80
|
-
json (~> 1.7.7)
|
81
|
-
mocha (~> 0.13)
|
82
|
-
rake (~> 10.0)
|
83
|
-
rake-compiler (~> 0.8)
|
84
|
-
rspec (~> 2.13)
|
85
|
-
ruby-prof (~> 0.13)
|
86
|
-
shoulda (~> 3.5)
|
data/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2009-2013 Marine Biological Laboratory
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|