glossarist 2.6.9 → 2.8.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3795091506d72a808355270feba237f8daf8f9d21b32ff97fb84942641ec1836
4
- data.tar.gz: bd2779483c782edb05046d386f2591cd3555cd95dcedd1a239e47cff8ea236cf
3
+ metadata.gz: c9161012e7bc694c31f1450dfdc28538de9b559c4ca3cbf6fd7aad8427976d44
4
+ data.tar.gz: 465de2a3598f6a21fa007068b7fb4b282bd8e917fdb9e226636830bd24fc88ef
5
5
  SHA512:
6
- metadata.gz: e3265eccbe271d756ef246968fa03bccaae9063e547de774faab0b4fd61b8ca371dbfcbe4b520d099ab54e04ed5ccf9e89e2ebb4114cd3967b81d74664242cf1
7
- data.tar.gz: 6e0f5ba16d874c2df69e1a1f8f66c52e722d16f8c9e601bb0eb7b0e5704d8e3f515d391e4d564e6b5167bc4cb856810adb5c2bf9a7a2b40d202a0f3101ed502b
6
+ metadata.gz: db1a01d3b4c1da4ec1e1ea9c15c976c0c11aaa1c53e7ac38ec2d6d3a87d6c2b23c26ac0606f16aba395e01bb7ada4c32401436af23cae94081582bc19aa155f1
7
+ data.tar.gz: 4471a27273205c88f7f8f0eaa397a351ef23a9d5abc53c397665ac3d8a1f9321b29b289d5151da380bb742e217c0739595f34aff15b13fe4f0cb905c6f5dffb6
data/config.yml CHANGED
@@ -57,6 +57,7 @@ related_concept:
57
57
  - narrower_instantial
58
58
  # Equivalence (ISO 10241-1 / ISO 25964 exactMatch / SKOS)
59
59
  - equivalent
60
+ - exact_match
60
61
  # Approximate equivalence (ISO 25964 closeMatch / SKOS)
61
62
  - close_match
62
63
  # Cross-vocabulary mapping (SKOS)
@@ -92,11 +93,19 @@ iso12620:
92
93
  - short_form
93
94
  - transliterated_form
94
95
  - transcribed_form
96
+ - truncation
95
97
  - variant
96
98
  # Symbolic / formulaic:
99
+ - code
97
100
  - equation
101
+ - figure_symbol
98
102
  - formula
103
+ - graphic_symbol
104
+ - letter_symbol
99
105
  - logical_expression
106
+ - mathematical_expression
107
+ - reference_symbol
108
+ - roman_numeral
100
109
  - symbol
101
110
  # Usage / provenance:
102
111
  - common_name
@@ -104,7 +113,9 @@ iso12620:
104
113
  - internationalism
105
114
  - international_scientific_term
106
115
  - part_number
116
+ - phrase
107
117
  - phraseological_unit
118
+ - scientific_name
108
119
  - shortcut
109
120
  - sku
110
121
  - standard_text
@@ -15,13 +15,21 @@ module Glossarist
15
15
  result = ValidationResult.new
16
16
  context = Validation::Rules::DatasetContext.new(@path)
17
17
  concept_rules = Validation::Rules::Registry.for_scope(:concept)
18
- total = ConceptCollector.count(@path)
19
- file_idx = 0
20
18
 
21
- ConceptCollector.each_concept(@path) do |concept|
22
- context.add_concept(concept)
19
+ all_concepts = ConceptCollector.collect(@path)
20
+ total = all_concepts.length
23
21
 
24
- fname = concept_file_name(concept, file_idx)
22
+ if total.zero?
23
+ yaml_files = find_yaml_files
24
+ if yaml_files.any?
25
+ result.add_error("YAML files found but no parseable concepts")
26
+ end
27
+ end
28
+
29
+ all_concepts.each { |c| context.add_concept(c) }
30
+
31
+ all_concepts.each_with_index do |concept, idx|
32
+ fname = concept_file_name(concept, idx)
25
33
  concept_context = Validation::Rules::ConceptContext.new(
26
34
  concept, file_name: fname, collection_context: context
27
35
  )
@@ -32,15 +40,7 @@ module Glossarist
32
40
  rule.check(concept_context).each { |i| result.add_issue(i) }
33
41
  end
34
42
 
35
- file_idx += 1
36
- @on_progress&.call(file_idx, total)
37
- end
38
-
39
- if file_idx.zero?
40
- yaml_files = find_yaml_files
41
- if yaml_files.any?
42
- result.add_error("YAML files found but no parseable concepts")
43
- end
43
+ @on_progress&.call(idx + 1, total)
44
44
  end
45
45
 
46
46
  # Run collection-level rules
@@ -28,9 +28,14 @@ module Glossarist
28
28
  end
29
29
 
30
30
  def self.build_from_directory(dataset_path)
31
+ concepts = ConceptCollector.collect(dataset_path)
32
+ build_from_concepts(concepts, dataset_path)
33
+ end
34
+
35
+ def self.build_from_concepts(concepts, dataset_path)
31
36
  index = new
32
37
  index_image_files(index, dataset_path)
33
- index_model_assets(index, dataset_path)
38
+ index_concept_assets(index, concepts)
34
39
  index
35
40
  end
36
41
 
@@ -63,11 +68,6 @@ module Glossarist
63
68
  end
64
69
  end
65
70
 
66
- def index_model_assets(index, dataset_path)
67
- concepts = ConceptCollector.collect(dataset_path)
68
- index_concept_assets(index, concepts)
69
- end
70
-
71
71
  def index_zip_images(index, zip_path)
72
72
  Zip::File.open(zip_path) do |zf|
73
73
  zf.entries.each do |entry|
@@ -38,7 +38,7 @@ module Glossarist
38
38
  end
39
39
 
40
40
  def asset_index
41
- @asset_index ||= AssetIndex.build_from_directory(@path)
41
+ @asset_index ||= AssetIndex.build_from_concepts(concepts, @path)
42
42
  end
43
43
 
44
44
  def declared_languages
@@ -4,5 +4,5 @@
4
4
  #
5
5
 
6
6
  module Glossarist
7
- VERSION = "2.6.9"
7
+ VERSION = "2.8.1"
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glossarist
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.9
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-05-25 00:00:00.000000000 Z
11
+ date: 2026-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model