biodiversity 3.5.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39237a14ed21c0cdf5ea9f7687240b3af4477e47
4
- data.tar.gz: 7d1d770ce5748b48f86cb0bebadb89307ef0a3bc
3
+ metadata.gz: 832687083196a98a5923318b0d778fde31c852d0
4
+ data.tar.gz: 2dc45e6f8d201ee8c9abcd5c2cbb41ad3e0c20fa
5
5
  SHA512:
6
- metadata.gz: d2eb0fa48343641f9c05ec8320834ddef60dc5794c058b91d813eed1db40991c0c865496fe6c39c485aabbe8d200a20aac71d67e3be58535e5972bf8b4d04697
7
- data.tar.gz: eda4fb5b701f8c1606285d2e90d64a82f59958e1cf0a56247be8e2f2cc1c30b6ff04ace786ba6e0e6e7e36ce4ce3b113ed1e83ad28fdbdc02df6a11c39938841
6
+ metadata.gz: af478fe58904ec048ef4b67f0671a1c7c8dc59144303af60129b117ce7ec775a1fa73ceb154f3e10f2a2d05cac173b72ff539231acb0b6cc7dab2a4baacc230f
7
+ data.tar.gz: e6494923af734096b435e27b50ef8239477d58110c6b9f59a0f36324cc7110b6461eb81f0218c00766d6919a3d7eaa7f03dfc688195c0456ea50a5141e5d44ac
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ 3.5.1 -- allow comma before 'and' or '&' in authorship
2
+
1
3
  3.5.0 -- add the tail cut by preprocessing to the results. The tail usually
2
4
  contains annotations about the name.
3
5
 
@@ -5567,7 +5567,8 @@ module ScientificNameClean
5567
5567
  module AuthorSeparator0
5568
5568
  def apply(a,b)
5569
5569
  sep = text_value.strip
5570
- sep = " &" if ["&", "&","and","et"].include? sep
5570
+ sep = " &" if ["&", "&", "and", "et",
5571
+ ",&", ", &", ",and", ", and"].include? sep
5571
5572
  sep = " apud" if sep == "apud"
5572
5573
  a.value + sep + " " + b.value
5573
5574
  end
@@ -5619,11 +5620,11 @@ module ScientificNameClean
5619
5620
  r0.extend(AuthorSeparator0)
5620
5621
  r0.extend(AuthorSeparator0)
5621
5622
  else
5622
- if (match_len = has_terminal?(",", false, index))
5623
- r3 = true
5623
+ if (match_len = has_terminal?(",&", false, index))
5624
+ r3 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5624
5625
  @index += match_len
5625
5626
  else
5626
- terminal_parse_failure('","')
5627
+ terminal_parse_failure('",&"')
5627
5628
  r3 = nil
5628
5629
  end
5629
5630
  if r3
@@ -5632,11 +5633,11 @@ module ScientificNameClean
5632
5633
  r0.extend(AuthorSeparator0)
5633
5634
  r0.extend(AuthorSeparator0)
5634
5635
  else
5635
- if (match_len = has_terminal?("apud", false, index))
5636
+ if (match_len = has_terminal?(", &", false, index))
5636
5637
  r4 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5637
5638
  @index += match_len
5638
5639
  else
5639
- terminal_parse_failure('"apud"')
5640
+ terminal_parse_failure('", &"')
5640
5641
  r4 = nil
5641
5642
  end
5642
5643
  if r4
@@ -5645,11 +5646,11 @@ module ScientificNameClean
5645
5646
  r0.extend(AuthorSeparator0)
5646
5647
  r0.extend(AuthorSeparator0)
5647
5648
  else
5648
- if (match_len = has_terminal?("and", false, index))
5649
+ if (match_len = has_terminal?(",and", false, index))
5649
5650
  r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5650
5651
  @index += match_len
5651
5652
  else
5652
- terminal_parse_failure('"and"')
5653
+ terminal_parse_failure('",and"')
5653
5654
  r5 = nil
5654
5655
  end
5655
5656
  if r5
@@ -5658,11 +5659,11 @@ module ScientificNameClean
5658
5659
  r0.extend(AuthorSeparator0)
5659
5660
  r0.extend(AuthorSeparator0)
5660
5661
  else
5661
- if (match_len = has_terminal?("et", false, index))
5662
+ if (match_len = has_terminal?(", and", false, index))
5662
5663
  r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5663
5664
  @index += match_len
5664
5665
  else
5665
- terminal_parse_failure('"et"')
5666
+ terminal_parse_failure('", and"')
5666
5667
  r6 = nil
5667
5668
  end
5668
5669
  if r6
@@ -5671,8 +5672,64 @@ module ScientificNameClean
5671
5672
  r0.extend(AuthorSeparator0)
5672
5673
  r0.extend(AuthorSeparator0)
5673
5674
  else
5674
- @index = i0
5675
- r0 = nil
5675
+ if (match_len = has_terminal?("apud", false, index))
5676
+ r7 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5677
+ @index += match_len
5678
+ else
5679
+ terminal_parse_failure('"apud"')
5680
+ r7 = nil
5681
+ end
5682
+ if r7
5683
+ r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
5684
+ r0 = r7
5685
+ r0.extend(AuthorSeparator0)
5686
+ r0.extend(AuthorSeparator0)
5687
+ else
5688
+ if (match_len = has_terminal?("and", false, index))
5689
+ r8 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5690
+ @index += match_len
5691
+ else
5692
+ terminal_parse_failure('"and"')
5693
+ r8 = nil
5694
+ end
5695
+ if r8
5696
+ r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true
5697
+ r0 = r8
5698
+ r0.extend(AuthorSeparator0)
5699
+ r0.extend(AuthorSeparator0)
5700
+ else
5701
+ if (match_len = has_terminal?("et", false, index))
5702
+ r9 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5703
+ @index += match_len
5704
+ else
5705
+ terminal_parse_failure('"et"')
5706
+ r9 = nil
5707
+ end
5708
+ if r9
5709
+ r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
5710
+ r0 = r9
5711
+ r0.extend(AuthorSeparator0)
5712
+ r0.extend(AuthorSeparator0)
5713
+ else
5714
+ if (match_len = has_terminal?(",", false, index))
5715
+ r10 = true
5716
+ @index += match_len
5717
+ else
5718
+ terminal_parse_failure('","')
5719
+ r10 = nil
5720
+ end
5721
+ if r10
5722
+ r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
5723
+ r0 = r10
5724
+ r0.extend(AuthorSeparator0)
5725
+ r0.extend(AuthorSeparator0)
5726
+ else
5727
+ @index = i0
5728
+ r0 = nil
5729
+ end
5730
+ end
5731
+ end
5732
+ end
5676
5733
  end
5677
5734
  end
5678
5735
  end
@@ -1000,7 +1000,7 @@ grammar ScientificNameClean
1000
1000
  }
1001
1001
  end
1002
1002
 
1003
- rule emend_authorship
1003
+ rule emend_authorship
1004
1004
  emend space b:simple_authorship {
1005
1005
  def value
1006
1006
  " emend. " + b.value
@@ -1125,10 +1125,11 @@ grammar ScientificNameClean
1125
1125
  end
1126
1126
 
1127
1127
  rule author_separator
1128
- ("&"/"&"/","/"apud"/"and"/"et") {
1128
+ ("&"/"&"/",&"/", &"/",and"/", and"/"apud"/"and"/"et"/",") {
1129
1129
  def apply(a,b)
1130
1130
  sep = text_value.strip
1131
- sep = " &" if ["&", "&","and","et"].include? sep
1131
+ sep = " &" if ["&", "&", "and", "et",
1132
+ ",&", ", &", ",and", ", and"].include? sep
1132
1133
  sep = " apud" if sep == "apud"
1133
1134
  a.value + sep + " " + b.value
1134
1135
  end
@@ -1,3 +1,3 @@
1
1
  module Biodiversity
2
- VERSION = "3.5.0"
2
+ VERSION = "3.5.1"
3
3
  end
@@ -80,6 +80,10 @@ M. alpium|{"scientificName":{"id":"9001ffb5-eac2-5bb4-8f78-d7b7e3e02bd8", "parse
80
80
  Mo. alpium (Osbeck, 1778)|{"scientificName":{"id":"1e9437b7-bf45-5b12-8da0-8966c6ea1c5c", "parsed":true, "parser_version":"test_version", "verbatim":"Mo. alpium (Osbeck, 1778)", "normalized":"Mo. alpium (Osbeck 1778)", "canonical":"Mo. alpium", "hybrid":false, "details":[{"genus":{"string":"Mo."}, "species":{"string":"alpium", "authorship":"(Osbeck, 1778)", "basionymAuthorTeam":{"authorTeam":"Osbeck", "author":["Osbeck"], "year":"1778"}}}], "parser_run":1, "positions":{"0":["genus", 4], "4":["species", 10], "12":["author_word", 18], "20":["year", 24]}}}
81
81
  Mom.alpium (Osbeck, 1778)|{"scientificName":{"id":"f1452bcf-b779-5d98-bfc8-56455105e3f5", "parsed":true, "parser_version":"test_version", "verbatim":"Mom.alpium (Osbeck, 1778)", "normalized":"Mom. alpium (Osbeck 1778)", "canonical":"Mom. alpium", "hybrid":false, "details":[{"genus":{"string":"Mom."}, "species":{"string":"alpium", "authorship":"(Osbeck, 1778)", "basionymAuthorTeam":{"authorTeam":"Osbeck", "author":["Osbeck"], "year":"1778"}}}], "parser_run":1, "positions":{"0":["genus", 4], "4":["species", 10], "12":["author_word", 18], "20":["year", 24]}}}
82
82
 
83
+ Cratomastotermitidae Engel, Grimaldi, and Krishna, 2009|{"scientificName":{"canonical":"Cratomastotermitidae", "details":[{"uninomial":{"authorship":"Engel, Grimaldi, and Krishna, 2009", "basionymAuthorTeam":{"author":["Engel", "Grimaldi", "Krishna"], "authorTeam":"Engel, Grimaldi, and Krishna", "year":"2009"}, "string":"Cratomastotermitidae"}}], "hybrid":false, "id":"805c4276-120e-5bef-81fd-e969ab0bccca", "normalized":"Cratomastotermitidae Engel, Grimaldi & Krishna 2009", "parsed":true, "parser_run":1, "parser_version":"test_version", "positions":{"0":["uninomial", 20], "21":["author_word", 26], "28":["author_word", 36], "42":["author_word", 49], "51":["year", 55]}, "verbatim":"Cratomastotermitidae Engel, Grimaldi, and Krishna, 2009"}}
84
+
85
+ Cratomastotermitidae Engel, Grimaldi,& Krishna, 2009|{"scientificName":{"canonical":"Cratomastotermitidae", "details":[{"uninomial":{"authorship":"Engel, Grimaldi,& Krishna, 2009", "basionymAuthorTeam":{"author":["Engel", "Grimaldi", "Krishna"], "authorTeam":"Engel, Grimaldi,& Krishna", "year":"2009"}, "string":"Cratomastotermitidae"}}], "hybrid":false, "id":"112f3fc9-c6f5-5369-9248-9fd4441bd4f1", "normalized":"Cratomastotermitidae Engel, Grimaldi & Krishna 2009", "parsed":true, "parser_run":1, "parser_version":"test_version", "positions":{"0":["uninomial", 20], "21":["author_word", 26], "28":["author_word", 36], "39":["author_word", 46], "48":["year", 52]}, "verbatim":"Cratomastotermitidae Engel, Grimaldi,& Krishna, 2009"}}
86
+
83
87
  #binomial with apostrophe in species epithet
84
88
  Junellia o'donelli Moldenke, 1946|{"scientificName":{"id":"e39a2d98-6ab2-5fb3-9aae-c48aa86c6026", "parsed":true, "parser_version":"test_version", "verbatim":"Junellia o'donelli Moldenke, 1946", "normalized":"Junellia odonelli Moldenke 1946", "canonical":"Junellia odonelli", "hybrid":false, "details":[{"genus":{"string":"Junellia"}, "species":{"string":"odonelli", "authorship":"Moldenke, 1946", "basionymAuthorTeam":{"authorTeam":"Moldenke", "author":["Moldenke"], "year":"1946"}}}], "parser_run":1, "positions":{"0":["genus", 8], "9":["species", 18], "19":["author_word", 27], "29":["year", 33]}}}
85
89
  Trophon d'orbignyi Carcelles, 1946|{"scientificName":{"id":"935d4414-05d4-5c16-be30-466f6144b666", "parsed":true, "parser_version":"test_version", "verbatim":"Trophon d'orbignyi Carcelles, 1946", "normalized":"Trophon dorbignyi Carcelles 1946", "canonical":"Trophon dorbignyi", "hybrid":false, "details":[{"genus":{"string":"Trophon"}, "species":{"string":"dorbignyi", "authorship":"Carcelles, 1946", "basionymAuthorTeam":{"authorTeam":"Carcelles", "author":["Carcelles"], "year":"1946"}}}], "parser_run":1, "positions":{"0":["genus", 7], "8":["species", 18], "19":["author_word", 28], "30":["year", 34]}}}
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.5.0
4
+ version: 3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Mozzherin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-16 00:00:00.000000000 Z
11
+ date: 2018-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: treetop