glossarist 2.13.0 → 2.13.2
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 +4 -4
- data/CLAUDE.md +7 -6
- data/config.yml +14 -5
- data/lib/glossarist/glossary_definition.rb +1 -2
- data/lib/glossarist/rdf/gloss_partitive_member.rb +8 -4
- data/lib/glossarist/rdf/gloss_partitive_relation.rb +1 -4
- data/lib/glossarist/rdf/v3.rb +0 -1
- data/lib/glossarist/rdf.rb +0 -2
- data/lib/glossarist/transforms/concept_to_gloss_transform.rb +0 -11
- data/lib/glossarist/v3/partitive_member.rb +42 -21
- data/lib/glossarist/v3/partitive_relation.rb +7 -11
- data/lib/glossarist/v3.rb +0 -2
- data/lib/glossarist/validation/rules/partitive_relation_rule.rb +26 -15
- data/lib/glossarist/version.rb +1 -1
- metadata +2 -4
- data/lib/glossarist/rdf/gloss_type_shared_plurality.rb +0 -31
- data/lib/glossarist/v3/type_shared_plurality.rb +0 -42
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bff178304ceb50c9e4f73bd22a66686ed7ae759786cf0abb4405e6594357dc49
|
|
4
|
+
data.tar.gz: f972e9d4a1b876577803285142ac3edb13f6b1a1b240ed416199340982db4e51
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0515fbecf5fac714751b7c6ae23168eb2371fdfc3359a26cf91a6a14efeb5c1700a1080dbe4418c254a601a05a2d734343c5f2ecf2c0dede871bb82cdd1d740f
|
|
7
|
+
data.tar.gz: 8fefaa9978f3ebe78ae5a03414e395dba36fa8c3887e0d40ff91889c3e6e36e7d2d22a627038478bc6491988c3849c4147420c4e0e6e5851231240ea9b82bac0
|
data/CLAUDE.md
CHANGED
|
@@ -54,20 +54,21 @@ keys off `concept.related`).
|
|
|
54
54
|
Each PartitiveRelation carries:
|
|
55
55
|
|
|
56
56
|
- `comprehensive` — ConceptRef to the superordinate concept partitive (the whole)
|
|
57
|
-
- `partitives` — `PartitiveMember [2..*]` (ISO 704 "two or more")
|
|
57
|
+
- `partitives` — `PartitiveMember [2..*]` (ISO 704 "two or more"). Each member wraps a ConceptRef plus ISO 704:2022 notation metadata:
|
|
58
|
+
- `multiplicity` — one of `compulsory` (1 solid line, default), `optional` (1 dashed line), `compulsory_multiple` (2 solid lines), `optional_multiple` (2 dashed lines), `compulsory_at_least_one` (1 solid + 1 dashed line)
|
|
59
|
+
- `is_delimiting` — boolean (default false). A delimiting part behaves like a delimiting characteristic: it distinguishes the comprehensive from coordinate concepts. Rendered as a bold 3x-width line in the diagram. Orthogonal to multiplicity.
|
|
58
60
|
- `completeness` — `complete` (default; the encoded partitives constitute the whole) or `partial` (others exist beyond those encoded). ISO 704 rake backline notation.
|
|
59
|
-
- `plurality` — optional `TypeSharedPlurality` block (ISO 704 close-set double line promoted to data: `is_shared`, `is_uncertain`, `shared_type`). Replaces the prior opaque `markers` field.
|
|
60
61
|
- `criterion` — optional localized string hash (`{ "eng" => "physical structure" }`). ISO 12620 coordinate-concept coherence: partitives within one relation share the comprehensive AND the criterion.
|
|
61
62
|
|
|
62
63
|
Wired into `V3::ManagedConcept#partitive_relations`. NOT on `ManagedConceptData` (relationships live at the concept level for MECE consistency with `related`).
|
|
63
64
|
|
|
64
|
-
Enum values are SSOT-loaded from `config.yml` via `GlossaryDefinition::COMPLETENESS_VALUES` and `
|
|
65
|
+
Enum values are SSOT-loaded from `config.yml` via `GlossaryDefinition::COMPLETENESS_VALUES` and `MULTIPLICITY_VALUES`. The `values:` option on each attribute documents the enum; the model's `validate!` method enforces structural invariants after construction (empty comprehensive, <2 partitives, self-loops, invalid enum values).
|
|
65
66
|
|
|
66
|
-
Semantic checks (≥2 partitives cardinality, duplicate comprehensive+criterion detection, criterion-absent warning, ExternalConcept shape) live in `Validation::Rules::PartitiveRelationRule` (auto-registered by `Validation::Rules`, code GLS-221).
|
|
67
|
+
Semantic checks (≥2 partitives cardinality, duplicate comprehensive+criterion detection, criterion-absent warning, non-default multiplicity warning, ExternalConcept shape) live in `Validation::Rules::PartitiveRelationRule` (auto-registered by `Validation::Rules`, code GLS-221).
|
|
67
68
|
|
|
68
|
-
RDF emission: `Rdf::GlossPartitiveRelation` view class with companion `GlossPartitiveMember
|
|
69
|
+
RDF emission: `Rdf::GlossPartitiveRelation` view class with companion `GlossPartitiveMember`. Wired into `Transforms::ConceptToGlossTransform` and emitted as `gloss:hasPartitiveRelation` link from `GlossConcept`.
|
|
69
70
|
|
|
70
|
-
Binary `broader_partitive`/`narrower_partitive`/`has_part`/`is_part_of` `RelatedConcept` edges and `PartitiveRelation` coexist — no automatic consolidation. Use a binary edge for pairwise relationships; use a PartitiveRelation when membership is jointly significant (≥2 partitives + completeness/
|
|
71
|
+
Binary `broader_partitive`/`narrower_partitive`/`has_part`/`is_part_of` `RelatedConcept` edges and `PartitiveRelation` coexist — no automatic consolidation. Use a binary edge for pairwise relationships; use a PartitiveRelation when membership is jointly significant (≥2 partitives + completeness/multiplicity/delimiting/criterion metadata).
|
|
71
72
|
|
|
72
73
|
#### ExternalConcept
|
|
73
74
|
|
data/config.yml
CHANGED
|
@@ -211,9 +211,18 @@ completeness:
|
|
|
211
211
|
- complete
|
|
212
212
|
- partial
|
|
213
213
|
|
|
214
|
-
|
|
215
|
-
#
|
|
216
|
-
# notation
|
|
214
|
+
multiplicity:
|
|
215
|
+
# ISO 704:2022 partitive member multiplicity. Encodes the diagram
|
|
216
|
+
# line notation as structured data:
|
|
217
|
+
# compulsory — 1 solid line (must exist in every instance)
|
|
218
|
+
# optional — 1 dashed line (exists in some instances only)
|
|
219
|
+
# compulsory_multiple — 2 solid lines (multiple must exist)
|
|
220
|
+
# optional_multiple — 2 dashed lines (multiple may exist)
|
|
221
|
+
# compulsory_at_least_one — 1 solid + 1 dashed line (at least one must exist)
|
|
222
|
+
# Default: compulsory.
|
|
217
223
|
value:
|
|
218
|
-
-
|
|
219
|
-
-
|
|
224
|
+
- compulsory
|
|
225
|
+
- optional
|
|
226
|
+
- compulsory_multiple
|
|
227
|
+
- optional_multiple
|
|
228
|
+
- compulsory_at_least_one
|
|
@@ -35,9 +35,8 @@ module Glossarist
|
|
|
35
35
|
ISO12620_TERM_TYPES = config.dig("iso12620", "term_type").freeze
|
|
36
36
|
|
|
37
37
|
# PartitiveRelation redesign (TODO.partitive-relation-v2).
|
|
38
|
-
# Replaces PARTITIVE_ENUMERATION_VALUES + PLURALITY_MARKER_VALUES.
|
|
39
38
|
COMPLETENESS_VALUES = config.dig("completeness", "value").freeze
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
MULTIPLICITY_VALUES = config.dig("multiplicity", "value").freeze
|
|
42
41
|
end
|
|
43
42
|
end
|
|
@@ -5,12 +5,14 @@ require "lutaml/model"
|
|
|
5
5
|
module Glossarist
|
|
6
6
|
module Rdf
|
|
7
7
|
# RDF view for V3::PartitiveMember. Emits a
|
|
8
|
-
# gloss:PartitiveMember subject with ref
|
|
8
|
+
# gloss:PartitiveMember subject with ref, multiplicity, and
|
|
9
|
+
# is_delimiting properties.
|
|
9
10
|
class GlossPartitiveMember < Lutaml::Model::Serializable
|
|
10
11
|
attribute :ref_id, :string
|
|
11
12
|
attribute :ref_source, :string
|
|
12
13
|
attribute :ref_text, :string
|
|
13
|
-
attribute :
|
|
14
|
+
attribute :multiplicity, :string
|
|
15
|
+
attribute :is_delimiting, :boolean
|
|
14
16
|
|
|
15
17
|
rdf do
|
|
16
18
|
namespace Namespaces::GlossaristNamespace
|
|
@@ -25,8 +27,10 @@ module Glossarist
|
|
|
25
27
|
to: :ref_id
|
|
26
28
|
predicate :refText, namespace: Namespaces::GlossaristNamespace,
|
|
27
29
|
to: :ref_text
|
|
28
|
-
predicate :
|
|
29
|
-
|
|
30
|
+
predicate :multiplicity, namespace: Namespaces::GlossaristNamespace,
|
|
31
|
+
to: :multiplicity
|
|
32
|
+
predicate :isDelimiting, namespace: Namespaces::GlossaristNamespace,
|
|
33
|
+
to: :is_delimiting
|
|
30
34
|
end
|
|
31
35
|
end
|
|
32
36
|
end
|
|
@@ -6,13 +6,12 @@ module Glossarist
|
|
|
6
6
|
module Rdf
|
|
7
7
|
# RDF view for V3::PartitiveRelation. Emits a
|
|
8
8
|
# gloss:PartitiveRelation subject with comprehensive, hasPartitive,
|
|
9
|
-
# completeness,
|
|
9
|
+
# completeness, criterion properties.
|
|
10
10
|
class GlossPartitiveRelation < Lutaml::Model::Serializable
|
|
11
11
|
attribute :identifier, :string
|
|
12
12
|
attribute :comprehensive_uri, :string
|
|
13
13
|
attribute :partitive_member_ids, :string, collection: true
|
|
14
14
|
attribute :completeness, :string
|
|
15
|
-
attribute :has_plurality, GlossTypeSharedPlurality
|
|
16
15
|
attribute :criterion, :hash
|
|
17
16
|
|
|
18
17
|
rdf do
|
|
@@ -28,8 +27,6 @@ module Glossarist
|
|
|
28
27
|
to: :partitive_member_ids, uri_reference: true
|
|
29
28
|
predicate :completeness, namespace: Namespaces::GlossaristNamespace,
|
|
30
29
|
to: :completeness, uri_reference: true
|
|
31
|
-
members :has_plurality,
|
|
32
|
-
link: "gloss:hasPlurality"
|
|
33
30
|
predicate :criterion, namespace: Namespaces::GlossaristNamespace,
|
|
34
31
|
to: :criterion
|
|
35
32
|
end
|
data/lib/glossarist/rdf/v3.rb
CHANGED
data/lib/glossarist/rdf.rb
CHANGED
|
@@ -44,8 +44,6 @@ module Glossarist
|
|
|
44
44
|
autoload :GlossFormula, "#{__dir__}/rdf/gloss_formula"
|
|
45
45
|
autoload :GlossPartitiveRelation, "#{__dir__}/rdf/gloss_partitive_relation"
|
|
46
46
|
autoload :GlossPartitiveMember, "#{__dir__}/rdf/gloss_partitive_member"
|
|
47
|
-
autoload :GlossTypeSharedPlurality,
|
|
48
|
-
"#{__dir__}/rdf/gloss_type_shared_plurality"
|
|
49
47
|
autoload :V3, "#{__dir__}/rdf/v3"
|
|
50
48
|
end
|
|
51
49
|
end
|
|
@@ -157,22 +157,11 @@ module Glossarist
|
|
|
157
157
|
partitive_member_uri(m)
|
|
158
158
|
end,
|
|
159
159
|
completeness: rel.completeness,
|
|
160
|
-
has_plurality: build_gloss_plurality(rel.plurality),
|
|
161
160
|
criterion: rel.criterion,
|
|
162
161
|
)
|
|
163
162
|
end
|
|
164
163
|
end
|
|
165
164
|
|
|
166
|
-
def build_gloss_plurality(plurality)
|
|
167
|
-
return nil unless plurality
|
|
168
|
-
|
|
169
|
-
Rdf::GlossTypeSharedPlurality.new(
|
|
170
|
-
is_shared: plurality.is_shared,
|
|
171
|
-
is_uncertain: plurality.is_uncertain,
|
|
172
|
-
shared_type_uri: partitive_concept_uri(plurality.shared_type),
|
|
173
|
-
)
|
|
174
|
-
end
|
|
175
|
-
|
|
176
165
|
def partitive_concept_uri(ref)
|
|
177
166
|
return nil unless ref.is_a?(Glossarist::ConceptRef)
|
|
178
167
|
|
|
@@ -3,36 +3,57 @@
|
|
|
3
3
|
module Glossarist
|
|
4
4
|
module V3
|
|
5
5
|
# PartitiveMember — one member of a PartitiveRelation, carrying
|
|
6
|
-
# a ConceptRef to the partitive concept plus
|
|
7
|
-
#
|
|
6
|
+
# a ConceptRef to the partitive concept plus ISO 704:2022
|
|
7
|
+
# multiplicity and delimiting metadata.
|
|
8
8
|
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# ISO 704:2022 partitive member notation:
|
|
10
|
+
#
|
|
11
|
+
# multiplicity (diagram line notation):
|
|
12
|
+
# compulsory — 1 solid line (must exist in every instance)
|
|
13
|
+
# optional — 1 dashed line (exists in some instances only)
|
|
14
|
+
# compulsory_multiple — 2 solid lines (multiple must exist)
|
|
15
|
+
# optional_multiple — 2 dashed lines (multiple may exist)
|
|
16
|
+
# compulsory_at_least_one — 1 solid + 1 dashed line (≥1 must exist)
|
|
17
|
+
#
|
|
18
|
+
# is_delimiting (orthogonal, bold 3x-width line in diagram):
|
|
19
|
+
# A delimiting part behaves like a delimiting characteristic:
|
|
20
|
+
# it distinguishes the comprehensive from coordinate concepts.
|
|
21
|
+
# Example (ISO 704 §5.5.4.2.2): for "optomechanical mouse",
|
|
22
|
+
# the delimiting parts are mouse ball, x/y-axis rollers,
|
|
23
|
+
# infrared emitter/sensor — they distinguish it from
|
|
24
|
+
# "mechanical mouse" and "optical mouse". Mouse button is
|
|
25
|
+
# NOT delimiting (all computer mice have buttons).
|
|
11
26
|
class PartitiveMember < Lutaml::Model::Serializable
|
|
12
|
-
|
|
27
|
+
DEFAULT_MULTIPLICITY = "compulsory"
|
|
13
28
|
|
|
14
29
|
attribute :ref, ConceptRef
|
|
15
|
-
attribute :
|
|
16
|
-
values: Glossarist::GlossaryDefinition::
|
|
17
|
-
default: -> {
|
|
30
|
+
attribute :multiplicity, :string,
|
|
31
|
+
values: Glossarist::GlossaryDefinition::MULTIPLICITY_VALUES,
|
|
32
|
+
default: -> { DEFAULT_MULTIPLICITY }
|
|
33
|
+
attribute :is_delimiting, :boolean, default: -> { false }
|
|
18
34
|
|
|
19
35
|
key_value do
|
|
20
36
|
map :ref, to: :ref
|
|
21
|
-
map :
|
|
37
|
+
map :multiplicity, to: :multiplicity
|
|
38
|
+
map :is_delimiting, to: :is_delimiting
|
|
22
39
|
end
|
|
23
40
|
|
|
24
41
|
def validate!
|
|
25
42
|
validate_ref!
|
|
26
|
-
|
|
43
|
+
validate_multiplicity!
|
|
27
44
|
self
|
|
28
45
|
end
|
|
29
46
|
|
|
30
|
-
def
|
|
31
|
-
|
|
47
|
+
def compulsory?
|
|
48
|
+
multiplicity == "compulsory"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def optional?
|
|
52
|
+
multiplicity == "optional"
|
|
32
53
|
end
|
|
33
54
|
|
|
34
|
-
def
|
|
35
|
-
|
|
55
|
+
def delimiting?
|
|
56
|
+
is_delimiting == true
|
|
36
57
|
end
|
|
37
58
|
|
|
38
59
|
private
|
|
@@ -45,15 +66,15 @@ module Glossarist
|
|
|
45
66
|
"(source, id, or text required)"
|
|
46
67
|
end
|
|
47
68
|
|
|
48
|
-
def
|
|
49
|
-
return if
|
|
69
|
+
def validate_multiplicity!
|
|
70
|
+
return if multiplicity.nil?
|
|
50
71
|
|
|
51
|
-
unless Glossarist::GlossaryDefinition::
|
|
52
|
-
.include?(
|
|
72
|
+
unless Glossarist::GlossaryDefinition::MULTIPLICITY_VALUES
|
|
73
|
+
.include?(multiplicity)
|
|
53
74
|
raise ArgumentError,
|
|
54
|
-
"PartitiveMember#
|
|
55
|
-
"#{
|
|
56
|
-
"#{GlossaryDefinition::
|
|
75
|
+
"PartitiveMember#multiplicity has invalid value " \
|
|
76
|
+
"#{multiplicity.inspect}; must be one of " \
|
|
77
|
+
"#{GlossaryDefinition::MULTIPLICITY_VALUES.join(', ')}"
|
|
57
78
|
end
|
|
58
79
|
end
|
|
59
80
|
end
|
|
@@ -12,10 +12,13 @@ module Glossarist
|
|
|
12
12
|
# within one relation are coordinate concepts: they share the
|
|
13
13
|
# comprehensive AND share the criterion of subdivision.
|
|
14
14
|
#
|
|
15
|
-
#
|
|
16
|
-
# -
|
|
17
|
-
#
|
|
18
|
-
#
|
|
15
|
+
# Per-partitive metadata (ISO 704:2022):
|
|
16
|
+
# - multiplicity (compulsory, optional, compulsory_multiple,
|
|
17
|
+
# optional_multiple, compulsory_at_least_one) — encodes the diagram
|
|
18
|
+
# line notation as data
|
|
19
|
+
# - is_delimiting — orthogonal flag; a delimiting part behaves
|
|
20
|
+
# like a delimiting characteristic (distinguishes the
|
|
21
|
+
# comprehensive from coordinate concepts)
|
|
19
22
|
#
|
|
20
23
|
# Replaces the prior PartitiveHyperedge class. The "hyperedge"
|
|
21
24
|
# framing was graph-theoretic; ISO calls this a *relation*.
|
|
@@ -27,14 +30,12 @@ module Glossarist
|
|
|
27
30
|
attribute :completeness, :string,
|
|
28
31
|
values: Glossarist::GlossaryDefinition::COMPLETENESS_VALUES,
|
|
29
32
|
default: -> { DEFAULT_COMPLETENESS }
|
|
30
|
-
attribute :plurality, TypeSharedPlurality
|
|
31
33
|
attribute :criterion, :hash
|
|
32
34
|
|
|
33
35
|
key_value do
|
|
34
36
|
map :comprehensive, to: :comprehensive
|
|
35
37
|
map :partitives, to: :partitives
|
|
36
38
|
map :completeness, to: :completeness
|
|
37
|
-
map :plurality, to: :plurality
|
|
38
39
|
map :criterion, to: :criterion
|
|
39
40
|
end
|
|
40
41
|
|
|
@@ -43,7 +44,6 @@ module Glossarist
|
|
|
43
44
|
validate_partitives!
|
|
44
45
|
validate_self_loop!
|
|
45
46
|
validate_completeness!
|
|
46
|
-
validate_plurality!
|
|
47
47
|
self
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -110,10 +110,6 @@ module Glossarist
|
|
|
110
110
|
"#{GlossaryDefinition::COMPLETENESS_VALUES.join(', ')}"
|
|
111
111
|
end
|
|
112
112
|
end
|
|
113
|
-
|
|
114
|
-
def validate_plurality!
|
|
115
|
-
plurality&.validate!
|
|
116
|
-
end
|
|
117
113
|
end
|
|
118
114
|
end
|
|
119
115
|
end
|
data/lib/glossarist/v3.rb
CHANGED
|
@@ -11,7 +11,6 @@ module Glossarist
|
|
|
11
11
|
autoload :RelatedConcept, "glossarist/v3/related_concept"
|
|
12
12
|
autoload :PartitiveRelation, "glossarist/v3/partitive_relation"
|
|
13
13
|
autoload :PartitiveMember, "glossarist/v3/partitive_member"
|
|
14
|
-
autoload :TypeSharedPlurality, "glossarist/v3/type_shared_plurality"
|
|
15
14
|
autoload :ConceptData, "glossarist/v3/concept_data"
|
|
16
15
|
autoload :LocalizedConcept, "glossarist/v3/localized_concept"
|
|
17
16
|
autoload :ManagedConceptData, "glossarist/v3/managed_concept_data"
|
|
@@ -28,7 +27,6 @@ module Glossarist
|
|
|
28
27
|
Configuration.register_model(RelatedConcept, id: :related_concept)
|
|
29
28
|
Configuration.register_model(PartitiveRelation, id: :partitive_relation)
|
|
30
29
|
Configuration.register_model(PartitiveMember, id: :partitive_member)
|
|
31
|
-
Configuration.register_model(TypeSharedPlurality, id: :type_shared_plurality)
|
|
32
30
|
Configuration.register_model(ManagedConceptData, id: :managed_concept_data)
|
|
33
31
|
Configuration.register_model(ManagedConcept, id: :managed_concept)
|
|
34
32
|
Configuration.register_model(ConceptDocument, id: :concept_document)
|
|
@@ -14,9 +14,8 @@ module Glossarist
|
|
|
14
14
|
# ISO 12620 coordinate-concept coherence)
|
|
15
15
|
# - warning when a relation has no criterion (cannot
|
|
16
16
|
# distinguish from siblings sharing the comprehensive)
|
|
17
|
-
# -
|
|
18
|
-
#
|
|
19
|
-
# close-set double line)
|
|
17
|
+
# - warning when multiplicity is not the default compulsory
|
|
18
|
+
# (encourages explicit statement of optional/multiple)
|
|
20
19
|
# - error when ExternalConcept (status: external) lacks
|
|
21
20
|
# at least one designation
|
|
22
21
|
#
|
|
@@ -47,7 +46,7 @@ module Glossarist
|
|
|
47
46
|
relations.each_with_index do |rel, idx|
|
|
48
47
|
check_cardinality(rel, idx, fname, issues)
|
|
49
48
|
check_criterion_present(rel, idx, fname, issues)
|
|
50
|
-
|
|
49
|
+
check_member_multiplicity(rel, idx, fname, issues)
|
|
51
50
|
end
|
|
52
51
|
|
|
53
52
|
check_duplicate_decomposition(relations, fname, issues)
|
|
@@ -86,18 +85,30 @@ module Glossarist
|
|
|
86
85
|
)
|
|
87
86
|
end
|
|
88
87
|
|
|
89
|
-
def
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
def check_member_multiplicity(rel, idx, fname, issues)
|
|
89
|
+
rel.partitives.each_with_index do |member, mi|
|
|
90
|
+
unless member.compulsory?
|
|
91
|
+
issues << issue(
|
|
92
|
+
"partitive_relation #{idx + 1}.partitives[#{mi}] has " \
|
|
93
|
+
"non-default multiplicity '#{member.multiplicity}'; " \
|
|
94
|
+
"ISO 704 diagram uses dashed/multiple-line notation for " \
|
|
95
|
+
"this — confirm the optionality is intentional",
|
|
96
|
+
severity: "warning",
|
|
97
|
+
location: fname,
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
next unless member.delimiting?
|
|
94
102
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
103
|
+
issues << issue(
|
|
104
|
+
"partitive_relation #{idx + 1}.partitives[#{mi}] is marked " \
|
|
105
|
+
"delimiting (ISO 704 bold 3x-width line); behaves like a " \
|
|
106
|
+
"delimiting characteristic distinguishing the comprehensive " \
|
|
107
|
+
"from coordinate concepts",
|
|
108
|
+
severity: "info",
|
|
109
|
+
location: fname,
|
|
110
|
+
)
|
|
111
|
+
end
|
|
101
112
|
end
|
|
102
113
|
|
|
103
114
|
def check_duplicate_decomposition(relations, fname, issues)
|
data/lib/glossarist/version.rb
CHANGED
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.13.
|
|
4
|
+
version: 2.13.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -315,7 +315,6 @@ files:
|
|
|
315
315
|
- lib/glossarist/rdf/gloss_pronunciation.rb
|
|
316
316
|
- lib/glossarist/rdf/gloss_reference.rb
|
|
317
317
|
- lib/glossarist/rdf/gloss_table.rb
|
|
318
|
-
- lib/glossarist/rdf/gloss_type_shared_plurality.rb
|
|
319
318
|
- lib/glossarist/rdf/localized_literal.rb
|
|
320
319
|
- lib/glossarist/rdf/lutaml_ext.rb
|
|
321
320
|
- lib/glossarist/rdf/namespaces.rb
|
|
@@ -400,7 +399,6 @@ files:
|
|
|
400
399
|
- lib/glossarist/v3/partitive_member.rb
|
|
401
400
|
- lib/glossarist/v3/partitive_relation.rb
|
|
402
401
|
- lib/glossarist/v3/related_concept.rb
|
|
403
|
-
- lib/glossarist/v3/type_shared_plurality.rb
|
|
404
402
|
- lib/glossarist/validation.rb
|
|
405
403
|
- lib/glossarist/validation/asset_index.rb
|
|
406
404
|
- lib/glossarist/validation/bibliography_index.rb
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "lutaml/model"
|
|
4
|
-
|
|
5
|
-
module Glossarist
|
|
6
|
-
module Rdf
|
|
7
|
-
# RDF view for V3::TypeSharedPlurality. Emits a
|
|
8
|
-
# gloss:TypeSharedPlurality subject with is_shared, is_uncertain,
|
|
9
|
-
# shared_type properties.
|
|
10
|
-
class GlossTypeSharedPlurality < Lutaml::Model::Serializable
|
|
11
|
-
attribute :is_shared, :boolean
|
|
12
|
-
attribute :is_uncertain, :boolean
|
|
13
|
-
attribute :shared_type_uri, :string
|
|
14
|
-
|
|
15
|
-
rdf do
|
|
16
|
-
namespace Namespaces::GlossaristNamespace
|
|
17
|
-
|
|
18
|
-
subject { |p| "plurality/#{p.object_id}" }
|
|
19
|
-
|
|
20
|
-
types "gloss:TypeSharedPlurality"
|
|
21
|
-
|
|
22
|
-
predicate :isShared, namespace: Namespaces::GlossaristNamespace,
|
|
23
|
-
to: :is_shared
|
|
24
|
-
predicate :isUncertain, namespace: Namespaces::GlossaristNamespace,
|
|
25
|
-
to: :is_uncertain
|
|
26
|
-
predicate :sharedType, namespace: Namespaces::GlossaristNamespace,
|
|
27
|
-
to: :shared_type_uri, uri_reference: true
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Glossarist
|
|
4
|
-
module V3
|
|
5
|
-
# TypeSharedPlurality — semantic claims encoded by ISO 704's
|
|
6
|
-
# close-set double line and broken line notation, promoted from
|
|
7
|
-
# diagram-notation flags to structured data so tools can reason
|
|
8
|
-
# about plurality directly.
|
|
9
|
-
#
|
|
10
|
-
# A PartitiveRelation has at most one TypeSharedPlurality block.
|
|
11
|
-
# Absent means: no type-shared plurality claim is being made.
|
|
12
|
-
#
|
|
13
|
-
# Replaces the prior `markers` field (which encoded the same
|
|
14
|
-
# information as opaque strings like "double" and "dashed").
|
|
15
|
-
class TypeSharedPlurality < Lutaml::Model::Serializable
|
|
16
|
-
attribute :is_shared, :boolean
|
|
17
|
-
attribute :is_uncertain, :boolean, default: -> { false }
|
|
18
|
-
attribute :shared_type, ConceptRef
|
|
19
|
-
|
|
20
|
-
key_value do
|
|
21
|
-
map :is_shared, to: :is_shared
|
|
22
|
-
map :is_uncertain, to: :is_uncertain
|
|
23
|
-
map :shared_type, to: :shared_type
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def validate!
|
|
27
|
-
unless is_shared.is_a?(TrueClass) || is_shared.is_a?(FalseClass)
|
|
28
|
-
raise ArgumentError,
|
|
29
|
-
"TypeSharedPlurality#is_shared is required (boolean)"
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
if is_uncertain == true && is_shared == false
|
|
33
|
-
raise ArgumentError,
|
|
34
|
-
"TypeSharedPlurality#is_uncertain requires is_shared: true " \
|
|
35
|
-
"(ISO 704 broken line qualifies the close-set double line claim)"
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
self
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|