biodiversity 3.4.2 → 3.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/lib/biodiversity/parser/scientific_name_canonical.rb +24 -11
- data/lib/biodiversity/parser/scientific_name_clean.rb +1528 -880
- data/lib/biodiversity/parser/scientific_name_clean.treetop +35 -3
- data/lib/biodiversity/parser/scientific_name_dirty.rb +93 -64
- data/lib/biodiversity/version.rb +1 -1
- data/spec/files/test_data.txt +4 -0
- metadata +2 -2
data/lib/biodiversity/version.rb
CHANGED
data/spec/files/test_data.txt
CHANGED
@@ -89,8 +89,10 @@ Serjania meridionalis Cambess. var. o'donelli F.A. Barkley|{"scientificName":{"i
|
|
89
89
|
#binomial with several authours
|
90
90
|
Pseudocercospora dendrobii Goh & W.H. Hsieh 1990|{"scientificName":{"id":"988fd6ba-0221-5b62-a041-fb81addc4465", "parsed":true, "parser_version":"test_version", "verbatim":"Pseudocercospora dendrobii Goh & W.H. Hsieh 1990", "normalized":"Pseudocercospora dendrobii Goh & W.H. Hsieh 1990", "canonical":"Pseudocercospora dendrobii", "hybrid":false, "details":[{"genus":{"string":"Pseudocercospora"}, "species":{"string":"dendrobii", "authorship":"Goh & W.H. Hsieh 1990", "basionymAuthorTeam":{"authorTeam":"Goh & W.H. Hsieh", "author":["Goh", "W.H. Hsieh"], "year":"1990"}}}], "parser_run":1, "positions":{"0":["genus", 16], "17":["species", 26], "27":["author_word", 30], "33":["author_word", 37], "38":["author_word", 43], "44":["year", 48]}}}
|
91
91
|
Pseudocercospora dendrobii Goh and W.H. Hsieh 1990|{"scientificName":{"id":"4d701dca-8774-5a5e-9378-11f60c0e735c", "parsed":true, "parser_version":"test_version", "verbatim":"Pseudocercospora dendrobii Goh and W.H. Hsieh 1990", "normalized":"Pseudocercospora dendrobii Goh & W.H. Hsieh 1990", "canonical":"Pseudocercospora dendrobii", "hybrid":false, "details":[{"genus":{"string":"Pseudocercospora"}, "species":{"string":"dendrobii", "authorship":"Goh and W.H. Hsieh 1990", "basionymAuthorTeam":{"authorTeam":"Goh and W.H. Hsieh", "author":["Goh", "W.H. Hsieh"], "year":"1990"}}}], "parser_run":1, "positions":{"0":["genus", 16], "17":["species", 26], "27":["author_word", 30], "35":["author_word", 39], "40":["author_word", 45], "46":["year", 50]}}}
|
92
|
+
Pseudocercospora dendrobii Goh apud W.H. Hsieh 1990|{"scientificName":{"id":"4dee6fc8-3be1-520c-9937-5a7342a17241", "parsed":true, "parser_version":"test_version", "verbatim":"Pseudocercospora dendrobii Goh apud W.H. Hsieh 1990", "normalized":"Pseudocercospora dendrobii Goh apud W.H. Hsieh 1990", "canonical":"Pseudocercospora dendrobii", "hybrid":false, "details":[{"genus":{"string":"Pseudocercospora"}, "species":{"string":"dendrobii", "authorship":"Goh apud W.H. Hsieh 1990", "basionymAuthorTeam":{"authorTeam":"Goh apud W.H. Hsieh", "author":["Goh", "W.H. Hsieh"], "year":"1990"}}}], "parser_run":1, "positions":{"0":["genus", 16], "17":["species", 26], "27":["author_word", 30], "36":["author_word", 40], "41":["author_word", 46], "47":["year", 51]}}}
|
92
93
|
Pseudocercospora dendrobii Goh et W.H. Hsieh 1990|{"scientificName":{"id":"13175b62-b95b-53b7-8d88-1be6fca794ec", "parsed":true, "parser_version":"test_version", "verbatim":"Pseudocercospora dendrobii Goh et W.H. Hsieh 1990", "normalized":"Pseudocercospora dendrobii Goh & W.H. Hsieh 1990", "canonical":"Pseudocercospora dendrobii", "hybrid":false, "details":[{"genus":{"string":"Pseudocercospora"}, "species":{"string":"dendrobii", "authorship":"Goh et W.H. Hsieh 1990", "basionymAuthorTeam":{"authorTeam":"Goh et W.H. Hsieh", "author":["Goh", "W.H. Hsieh"], "year":"1990"}}}], "parser_run":1, "positions":{"0":["genus", 16], "17":["species", 26], "27":["author_word", 30], "34":["author_word", 38], "39":["author_word", 44], "45":["year", 49]}}}
|
93
94
|
Schottera nicaeënsis (J.V. Lamouroux ex Duby) Guiry & Hollenberg|{"scientificName":{"id":"ffeb3703-63e5-5ff3-b296-582c0c3a3373", "parsed":true, "parser_version":"test_version", "verbatim":"Schottera nicaeënsis (J.V. Lamouroux ex Duby) Guiry & Hollenberg", "normalized":"Schottera nicaeensis (J.V. Lamouroux ex Duby) Guiry & Hollenberg", "canonical":"Schottera nicaeensis", "hybrid":false, "details":[{"genus":{"string":"Schottera"}, "species":{"string":"nicaeensis", "authorship":"(J.V. Lamouroux ex Duby) Guiry & Hollenberg", "combinationAuthorTeam":{"authorTeam":"Guiry & Hollenberg", "author":["Guiry", "Hollenberg"]}, "basionymAuthorTeam":{"authorTeam":"J.V. Lamouroux", "author":["J.V. Lamouroux"], "exAuthorTeam":{"authorTeam":"Duby", "author":["Duby"]}}}}], "parser_run":1, "positions":{"0":["genus", 9], "10":["species", 20], "22":["author_word", 26], "27":["author_word", 36], "40":["author_word", 44], "46":["author_word", 51], "54":["author_word", 64]}}}
|
95
|
+
Schottera nicaeënsis (J.V. Lamouroux ex Duby in Duby apud Johnson) Guiry & Hollenberg|{"scientificName":{"id":"5a929f5c-c4f1-5ba4-8a5f-eb906d43c692", "parsed":true, "parser_version":"test_version", "verbatim":"Schottera nicaeënsis (J.V. Lamouroux ex Duby in Duby apud Johnson) Guiry & Hollenberg", "normalized":"Schottera nicaeensis (J.V. Lamouroux ex Duby ex Duby apud Johnson) Guiry & Hollenberg", "canonical":"Schottera nicaeensis", "hybrid":false, "details":[{"genus":{"string":"Schottera"}, "species":{"string":"nicaeensis", "authorship":"(J.V. Lamouroux ex Duby in Duby apud Johnson) Guiry & Hollenberg", "combinationAuthorTeam":{"authorTeam":"Guiry & Hollenberg", "author":["Guiry", "Hollenberg"]}, "basionymAuthorTeam":{"authorTeam":"J.V. Lamouroux", "author":["J.V. Lamouroux"], "exAuthorTeam":{"authorTeam":"Duby", "author":["Duby"]}}}}], "parser_run":1, "positions":{"0":["genus", 9], "10":["species", 20], "22":["author_word", 26], "27":["author_word", 36], "40":["author_word", 44], "67":["author_word", 72], "75":["author_word", 85]}}}
|
94
96
|
|
95
97
|
#binomial with several authors and a year
|
96
98
|
Pseudocercospora dendrobii U. Braun & Crous 2003|{"scientificName":{"id":"afd958fc-82a5-5551-951b-a725a49d3df0", "parsed":true, "parser_version":"test_version", "parser_run":1,"verbatim":"Pseudocercospora dendrobii U. Braun & Crous 2003","normalized":"Pseudocercospora dendrobii U. Braun & Crous 2003","canonical":"Pseudocercospora dendrobii","hybrid":false,"details":[{"genus":{"string":"Pseudocercospora"},"species":{"string":"dendrobii","authorship":"U. Braun & Crous 2003","basionymAuthorTeam":{"authorTeam":"U. Braun & Crous","author":["U. Braun","Crous"],"year":"2003"}}}],"positions":{"0":["genus",16],"17":["species",26],"27":["author_word",29],"30":["author_word",35],"38":["author_word",43],"44":["year",48]}}}
|
@@ -242,6 +244,7 @@ Agaricus squamula Berk. & M.A. Curtis 1860|{"scientificName":{"id":"153b8745-887
|
|
242
244
|
Peltula coriacea Büdel, Henssen & Wessels 1986|{"scientificName":{"id":"081f5751-4042-597e-bccc-788754ce0248", "parsed":true, "parser_version":"test_version", "parser_run":1,"verbatim":"Peltula coriacea B\u00fcdel, Henssen & Wessels 1986","normalized":"Peltula coriacea B\u00fcdel, Henssen & Wessels 1986","canonical":"Peltula coriacea","hybrid":false,"details":[{"genus":{"string":"Peltula"},"species":{"string":"coriacea","authorship":"B\u00fcdel, Henssen & Wessels 1986","basionymAuthorTeam":{"authorTeam":"B\u00fcdel, Henssen & Wessels","author":["B\u00fcdel","Henssen","Wessels"],"year":"1986"}}}],"positions":{"0":["genus",7],"8":["species",16],"17":["author_word",22],"24":["author_word",31],"34":["author_word",41],"42":["year",46]}}}
|
243
245
|
Saccharomyces drosophilae anon.|{"scientificName":{"id":"45e537d2-6833-5429-a58c-178fe37fc3f5", "parsed":true, "parser_version":"test_version", "parser_run":1,"verbatim":"Saccharomyces drosophilae anon.","normalized":"Saccharomyces drosophilae anon.","canonical":"Saccharomyces drosophilae","hybrid":false,"details":[{"genus":{"string":"Saccharomyces"},"species":{"string":"drosophilae","authorship":"anon.","basionymAuthorTeam":{"authorTeam":"anon.","author":["unknown"]}}}],"positions":{"0":["genus",13],"14":["species",25],"26":["unknown_author",31]}}}
|
244
246
|
Abacetus laevicollis de Chaudoir, 1869|{"scientificName":{"id":"8d81b939-695f-5a38-86c7-0f6efd1cacf3", "parsed":true, "parser_version":"test_version", "parser_run":1,"verbatim":"Abacetus laevicollis de Chaudoir, 1869","normalized":"Abacetus laevicollis de Chaudoir 1869","canonical":"Abacetus laevicollis","hybrid":false,"details":[{"genus":{"string":"Abacetus"},"species":{"string":"laevicollis","authorship":"de Chaudoir, 1869","basionymAuthorTeam":{"authorTeam":"de Chaudoir","author":["de Chaudoir"],"year":"1869"}}}],"positions":{"0":["genus",8],"9":["species",20],"21":["author_word",23],"24":["author_word",32],"34":["year",38]}}}
|
247
|
+
Abacetus laevicollis do Chaudoir, 1869|{"scientificName":{"id":"8f000a09-f5c6-55c6-891f-d60130b98ff9", "parsed":true, "parser_version":"test_version", "verbatim":"Abacetus laevicollis do Chaudoir, 1869", "normalized":"Abacetus laevicollis do Chaudoir 1869", "canonical":"Abacetus laevicollis", "hybrid":false, "details":[{"genus":{"string":"Abacetus"}, "species":{"string":"laevicollis", "authorship":"do Chaudoir, 1869", "basionymAuthorTeam":{"authorTeam":"do Chaudoir", "author":["do Chaudoir"], "year":"1869"}}}], "parser_run":1, "positions":{"0":["genus", 8], "9":["species", 20], "21":["author_word", 23], "24":["author_word", 32], "34":["year", 38]}}}
|
245
248
|
Gastrosericus eremorum von Beaumont 1955|{"scientificName":{"id":"98df7228-03ef-511c-9f2d-7f91e10c2af5", "parsed":true, "parser_version":"test_version", "parser_run":1,"verbatim":"Gastrosericus eremorum von Beaumont 1955","normalized":"Gastrosericus eremorum von Beaumont 1955","canonical":"Gastrosericus eremorum","hybrid":false,"details":[{"genus":{"string":"Gastrosericus"},"species":{"string":"eremorum","authorship":"von Beaumont 1955","basionymAuthorTeam":{"authorTeam":"von Beaumont","author":["von Beaumont"],"year":"1955"}}}],"positions":{"0":["genus",13],"14":["species",22],"23":["author_word",26],"27":["author_word",35],"36":["year",40]}}}
|
246
249
|
Cypraeovula (Luponia) amphithales perdentata|{"scientificName":{"id":"d05be4e3-a0e3-5af4-9104-7922df1bcb47", "parsed":true, "parser_version":"test_version", "parser_run":1,"verbatim":"Cypraeovula (Luponia) amphithales perdentata","normalized":"Cypraeovula (Luponia) amphithales perdentata","canonical":"Cypraeovula amphithales perdentata","hybrid":false,"details":[{"genus":{"string":"Cypraeovula"},"infragenus":{"string":"Luponia"},"species":{"string":"amphithales"},"infraspecies":[{"string":"perdentata","rank":"n\/a"}]}],"positions":{"0":["genus",11],"13":["infragenus",20],"22":["species",33],"34":["infraspecies",44]}}}
|
247
250
|
Polyrhachis orsyllus nat musculus Forel 1901|{"scientificName":{"id":"3392132e-3dba-5b7e-a7c9-e4a68954c8b2", "parsed":true, "parser_version":"test_version", "verbatim":"Polyrhachis orsyllus nat musculus Forel 1901", "normalized":"Polyrhachis orsyllus nat musculus Forel 1901", "canonical":"Polyrhachis orsyllus musculus", "hybrid":false, "details":[{"genus":{"string":"Polyrhachis"}, "species":{"string":"orsyllus"}, "infraspecies":[{"string":"musculus", "rank":"nat", "authorship":"Forel 1901", "basionymAuthorTeam":{"authorTeam":"Forel", "author":["Forel"], "year":"1901"}}]}], "parser_run":1, "positions":{"0":["genus", 11], "12":["species", 20], "21":["infraspecific_type", 24], "25":["infraspecies", 33], "34":["author_word", 39], "40":["year", 44]}}}
|
@@ -406,6 +409,7 @@ Goggia gemmula 1996|{"scientificName":{"id":"707ab43c-41bd-56bc-b2aa-96db4913ad3
|
|
406
409
|
Oxytropis minjanensis Rech. f.|{"scientificName":{"id":"6027cbc2-fa15-510b-ab3e-e1fa44cbd551", "parsed":true, "parser_version":"test_version", "verbatim":"Oxytropis minjanensis Rech. f.", "normalized":"Oxytropis minjanensis Rech. f.", "canonical":"Oxytropis minjanensis", "hybrid":false, "details":[{"genus":{"string":"Oxytropis"}, "species":{"string":"minjanensis", "authorship":"Rech. f.", "basionymAuthorTeam":{"authorTeam":"Rech. f.", "author":["Rech. f."]}}}], "parser_run":1, "positions":{"0":["genus", 9], "10":["species", 21], "22":["author_word", 27], "28":["author_word", 30]}}}
|
407
410
|
Platypus bicaudatulus Schedl f. 1935|{"scientificName":{"id":"05799df9-471e-5c68-92fe-4edcc0a69d29", "parsed":true, "parser_version":"test_version", "verbatim":"Platypus bicaudatulus Schedl f. 1935", "normalized":"Platypus bicaudatulus Schedl f. 1935", "canonical":"Platypus bicaudatulus", "hybrid":false, "details":[{"genus":{"string":"Platypus"}, "species":{"string":"bicaudatulus", "authorship":"Schedl f. 1935", "basionymAuthorTeam":{"authorTeam":"Schedl f.", "author":["Schedl f."], "year":"1935"}}}], "parser_run":1, "positions":{"0":["genus", 8], "9":["species", 21], "22":["author_word", 28], "29":["author_word", 31], "32":["year", 36]}}}
|
408
411
|
Platypus bicaudatulus Schedl filius 1935|{"scientificName":{"id":"2b6cd51f-aa0f-58fd-88fa-2e261cedacbb", "parsed":true, "parser_version":"test_version", "verbatim":"Platypus bicaudatulus Schedl filius 1935", "normalized":"Platypus bicaudatulus Schedl filius 1935", "canonical":"Platypus bicaudatulus", "hybrid":false, "details":[{"genus":{"string":"Platypus"}, "species":{"string":"bicaudatulus", "authorship":"Schedl filius 1935", "basionymAuthorTeam":{"authorTeam":"Schedl filius", "author":["Schedl filius"], "year":"1935"}}}], "parser_run":1, "positions":{"0":["genus", 8], "9":["species", 21], "22":["author_word", 28], "29":["author_word", 35], "36":["year", 40]}}}
|
412
|
+
Platypus bicaudatulus Schedl fil. 1935|{"scientificName":{"id":"9ecd2519-8481-56e4-abe0-23408cfc0922", "parsed":true, "parser_version":"test_version", "verbatim":"Platypus bicaudatulus Schedl fil. 1935", "normalized":"Platypus bicaudatulus Schedl fil. 1935", "canonical":"Platypus bicaudatulus", "hybrid":false, "details":[{"genus":{"string":"Platypus"}, "species":{"string":"bicaudatulus", "authorship":"Schedl fil. 1935", "basionymAuthorTeam":{"authorTeam":"Schedl fil.", "author":["Schedl fil."], "year":"1935"}}}], "parser_run":1, "positions":{"0":["genus", 8], "9":["species", 21], "22":["author_word", 28], "29":["author_word", 33], "34":["year", 38]}}}
|
409
413
|
Fimbristylis ovata (Burm. f.) J. Kern|{"scientificName":{"id":"01207e0b-8de4-5a4e-99fc-e60b581c0d1c", "parsed":true, "parser_version":"test_version", "verbatim":"Fimbristylis ovata (Burm. f.) J. Kern", "normalized":"Fimbristylis ovata (Burm. f.) J. Kern", "canonical":"Fimbristylis ovata", "hybrid":false, "details":[{"genus":{"string":"Fimbristylis"}, "species":{"string":"ovata", "authorship":"(Burm. f.) J. Kern", "combinationAuthorTeam":{"authorTeam":"J. Kern", "author":["J. Kern"]}, "basionymAuthorTeam":{"authorTeam":"Burm. f.", "author":["Burm. f."]}}}], "parser_run":1, "positions":{"0":["genus", 12], "13":["species", 18], "20":["author_word", 25], "26":["author_word", 28], "30":["author_word", 32], "33":["author_word", 37]}}}
|
410
414
|
Carex chordorrhiza Ehrh. ex L. f.|{"scientificName":{"id":"b972d277-3714-5549-9103-869675f490bd", "parsed":true, "parser_version":"test_version", "verbatim":"Carex chordorrhiza Ehrh. ex L. f.", "normalized":"Carex chordorrhiza Ehrh. ex L. f.", "canonical":"Carex chordorrhiza", "hybrid":false, "details":[{"genus":{"string":"Carex"}, "species":{"string":"chordorrhiza", "authorship":"Ehrh. ex L. f.", "basionymAuthorTeam":{"authorTeam":"Ehrh.", "author":["Ehrh."], "exAuthorTeam":{"authorTeam":"L. f.", "author":["L. f."]}}}}], "parser_run":1, "positions":{"0":["genus", 5], "6":["species", 18], "19":["author_word", 24], "28":["author_word", 30], "31":["author_word", 33]}}}
|
411
415
|
Amelanchier arborea var. arborea (Michx. f.) Fernald|{"scientificName":{"id":"1644869c-3e0c-5e7e-a709-a86dee11b917", "parsed":true, "parser_version":"test_version", "verbatim":"Amelanchier arborea var. arborea (Michx. f.) Fernald", "normalized":"Amelanchier arborea var. arborea (Michx. f.) Fernald", "canonical":"Amelanchier arborea arborea", "hybrid":false, "details":[{"genus":{"string":"Amelanchier"}, "species":{"string":"arborea"}, "infraspecies":[{"string":"arborea", "rank":"var.", "authorship":"(Michx. f.) Fernald", "combinationAuthorTeam":{"authorTeam":"Fernald", "author":["Fernald"]}, "basionymAuthorTeam":{"authorTeam":"Michx. f.", "author":["Michx. f."]}}]}], "parser_run":1, "positions":{"0":["genus", 11], "12":["species", 19], "20":["infraspecific_type", 24], "25":["infraspecies", 32], "34":["author_word", 40], "41":["author_word", 43], "45":["author_word", 52]}}}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biodiversity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Mozzherin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: treetop
|