tc211-termbase 0.1.6 → 0.1.7

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
  SHA256:
3
- metadata.gz: 2425ba17ea2896d4529728a848752fa7d4505e2e6daf0f6afa44063b7cbd7844
4
- data.tar.gz: f910a49e455443990ea9a66b6fde40ea19d3b1f0c4d56ed4f5b4b08b8e8042f1
3
+ metadata.gz: 96e9ae479fc780b5643eb78d4ea9b716ef297dcb3cdbaa329a7f3994e76a4b9c
4
+ data.tar.gz: 5ae853f863b8ffc90e1485343ed17690155182c5d0a4958b24ce760f1e019baa
5
5
  SHA512:
6
- metadata.gz: a765b412a819d2a8282588bf1b725c294c1210c99268f9705859d4f98a308b13ba5dca463625a843b8f711a87ed6e4827570c420d1392bec2ae0ecb722b23330
7
- data.tar.gz: a026816095b8767760f6009c56a815b4f18decee028acb866a6fc1fbd2f7bcd52448b55d4201d7ffccb989424aa9fe60d2d132686f59ee9ff6914f6252ab0856
6
+ metadata.gz: 9b46dc13a7ef20b1efae6398470c75c43cee81c38048c0d16fa52df9bf34b840dfaebdb92b1919f258e2364e012cbd6705dfda1e7ec735414cfc493c5ec89c83
7
+ data.tar.gz: 742bf51d592fa2661a7b610c58a423ba97dea3fa8a03b1b658017d985e29dcf6bf6465ab9058872e991e7c816dade89d93f2137d36c84c971cd438dbfc77d98b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tc211-termbase (0.1.5)
4
+ tc211-termbase (0.1.7)
5
5
  creek
6
6
  iso-639
7
7
  relaton (~> 0.5)
@@ -7,10 +7,18 @@ class MetadataSection < SheetSection
7
7
  attr_accessor :attributes
8
8
 
9
9
  GLOSSARY_HEADER_ROW_MATCH = {
10
- "A" => [nil, "Item", "A"], # "Arabic" uses "A"
10
+ # "English" uses "".
11
+ # "Arabic" uses "A".
12
+ # This is fixed in the MLGT as of 2018 Aug 6.
13
+ "A" => [nil, "Item", "A"],
14
+
11
15
  "C" => ["Data Type"],
12
16
  "D" => ["Special Instruction"],
13
- "E" => ["ISO 19135 Class.attribute", nil], # "Malay" has it empty ("")
17
+
18
+ # "Malay" has it empty ("")
19
+ # This is fixed in the MLGT as of 2018 Aug 6.
20
+ "E" => ["ISO 19135 Class.attribute", nil],
21
+
14
22
  "F" => ["Domain"]
15
23
  }
16
24
 
@@ -22,16 +22,24 @@ module Tc211::Termbase
22
22
  "Term" => "term",
23
23
  "Term .OPERATING LANGUAGE." => "term",
24
24
  # In the English sheet, column is named "Term Abbreviation"
25
+ # This is fixed in the MLGT as of 2018 Aug 6.
25
26
  "Term Abbreviation" => "abbrev",
27
+ "Term_Abbreviation" => "abbrev",
26
28
  # In other sheets, column named "Term_Abbreviation"
27
29
  "Term_Abbreviation .OPERATING LANGUAGE." => "abbrev",
30
+
28
31
  "Country code" => "country-code",
29
32
  "Definition" => "definition",
30
33
  "Term .OPERATING LANGUAGE - ALTERNATIVE CHARACTER SET." => "alt",
31
34
  "Term in English" => nil,
32
35
  "Entry Status" => "entry-status",
33
36
  ## Must be one of 'notValid' 'valid' 'superseded' 'retired'
37
+
38
+ # "Term Clasification" is misspelt.
39
+ # This is fixed in the MLGT as of 2018 Aug 6.
34
40
  "Term Clasification" => "classification",
41
+ "Term Classification" => "classification",
42
+
35
43
  ## Must be one of the following 'preferred' 'admitted' 'deprecated'
36
44
  "Review Indicator" => "review-indicator",
37
45
  ## Must be one of the following <empty field> 'Under Review in Source Document'",
@@ -87,11 +95,15 @@ module Tc211::Termbase
87
95
 
88
96
  # convert whitespace to a single space
89
97
  cleaned_value = value.gsub(/\s+/, ' ')
98
+ # puts "cleaned_value #{cleaned_value}"
90
99
 
91
100
  matches = TERM_BODY_COLUMN_MAP.map do |key, value|
92
- # puts "key #{key}, value #{value}"
93
- if cleaned_value[Regexp.new("^#{key}")]
101
+ if match = cleaned_value[Regexp.new("^#{key}")]
102
+ # puts "matched! key #{key}, value #{value}, match (#{match}, #{match.length})"
94
103
  [key, value]
104
+ else
105
+ # puts "no match! key #{key}, value #{value}"
106
+ nil
95
107
  end
96
108
  end.compact
97
109
 
@@ -107,6 +119,9 @@ module Tc211::Termbase
107
119
  end
108
120
 
109
121
  end
122
+
123
+ # puts "============ structure is: #{@structure.inspect}"
124
+ @structure
110
125
  end
111
126
 
112
127
  def self.match_header(columns)
@@ -1,5 +1,5 @@
1
1
  module Tc211
2
2
  module Termbase
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tc211-termbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-06 00:00:00.000000000 Z
11
+ date: 2019-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639
@@ -151,7 +151,7 @@ files:
151
151
  - db/iso/iso_3534_1.xml
152
152
  - db/iso/iso_3534_1_1993.xml
153
153
  - db/iso/iso_iec_19501.xml
154
- - db/iso/iso_iec_19501_2005_.xml
154
+ - db/iso/iso_iec_19501_2005.xml
155
155
  - db/iso/iso_iec_2382_17_1999.xml
156
156
  - db/version
157
157
  - exe/tc211-termbase-xlsx2yaml