rhoella-dictionaries 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 402bad05f5e43960868be925af648ee3b0c16330ad6107402e3feda82e8ace52
4
+ data.tar.gz: fef940a45cc6e5ea5357b1d9cf83d73bb40fd77637954581030063981681531a
5
+ SHA512:
6
+ metadata.gz: 2e59e24501816f3c19167f9096c7165cd74613b831bb1e3d833bf850b8f201d6f475b2680864b2074a3c1e06cc09b87d844a62f98faf0b2485affa9a0b0047b9
7
+ data.tar.gz: c4117f5075f2edd8e7d320f07b4d28dac5ea7a2e2cd4173238bdea0b72b607615494d88a50161be2b5bcb7a1258408e02a237f1e2f5bfbba24488a77624aa389
data/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # rhoella-dictionaries
2
+
3
+ The sealed dictionaries data package for the [rhoella](https://www.rhoella.org)
4
+ fleet — the audited number-profile vocabulary
5
+ ([SPEC](https://github.com/rhoella/rhoella/blob/main/docs/number-profiles/SPEC.md))
6
+ as checksum-sealed YAML:
7
+
8
+ - `profiles/base.yml` — the neutral structure root (rounding, precision,
9
+ notation, exponent, signs, radix); structure keys are TOTAL here.
10
+ - `profiles/languages/` — the symbol-key language profiles (decimal,
11
+ grouping); disjoint from the structure keys, so composition cannot
12
+ cancel accidentally.
13
+ - `profiles/authorities/` — the authority profiles: ISO/IEC Directives
14
+ Part 2 (comma in every language version), SI Brochure, ITU, ISO 2533,
15
+ plain (grouping off), lab.
16
+
17
+ Pure data. No code beyond the package `PATH` constant, no dependencies.
18
+ Install it alongside [rhoella](https://github.com/rhoella/rhoella) and
19
+ the number-profile interpreter resolves its data automatically:
20
+
21
+ ```console
22
+ $ gem install rhoella rhoella-dictionaries
23
+ $ ruby -rrhoella -e 'puts Rhoella.render_number("9.80616", profile: "si-brochure", lang: "fr")'
24
+ ```
25
+
26
+ Without the package, the interpreter raises the named install-hint
27
+ error; hosts may also point `Rhoella::Profiles.data_path =` or
28
+ `ENV["RHOELLA_PROFILES_DATA"]` at an explicit profiles directory.
29
+
30
+ ## The seal
31
+
32
+ `data/manifest.json` carries a sha256 + byte size per artifact. CI
33
+ verifies the seal and never re-bakes; hosts may verify with
34
+ `ruby tools/verify.rb`.
@@ -0,0 +1,42 @@
1
+ {
2
+ "package": "rhoella-dictionaries",
3
+ "schema": 1,
4
+ "artifacts": {
5
+ "profiles/authorities/iso-2533.yml": {
6
+ "sha256": "8d54978d45d598c495a55250b6aca258e8b332c76fbdf0de7d1761708968c8a5",
7
+ "bytes": 470
8
+ },
9
+ "profiles/authorities/iso-80000-1.yml": {
10
+ "sha256": "0c62e5d015271044f3f375c21ca959440f307fad624dee2f3f113da3a0cc0a29",
11
+ "bytes": 507
12
+ },
13
+ "profiles/authorities/itu.yml": {
14
+ "sha256": "50c2344f6c0d2db14577c97125ffeab8d0ac315b3e22a9a6b900a77cbb2e67b6",
15
+ "bytes": 370
16
+ },
17
+ "profiles/authorities/lab.yml": {
18
+ "sha256": "c8d5bfadaa1000c025a69071c352c7533193ce674e258fe6cba6348574fd8110",
19
+ "bytes": 1515
20
+ },
21
+ "profiles/authorities/plain.yml": {
22
+ "sha256": "24f2a3f74af73b9ba5b33fe3f4f071205c39935140d982dcb2bd7730405003ed",
23
+ "bytes": 321
24
+ },
25
+ "profiles/authorities/si-brochure.yml": {
26
+ "sha256": "7a4b89ffb9592e2dceb46609be45d729411f573e9c65562f7a85e237632a763c",
27
+ "bytes": 471
28
+ },
29
+ "profiles/base.yml": {
30
+ "sha256": "23f2abf0c0379a8b7d3b0c816ccf6d071c70f80f97c766e22b145291f60b5511",
31
+ "bytes": 717
32
+ },
33
+ "profiles/languages/en.yml": {
34
+ "sha256": "6c1cbefe4728ff66417e715437187f066809ccfbde84ae0138165bc5f9bb23fc",
35
+ "bytes": 236
36
+ },
37
+ "profiles/languages/fr.yml": {
38
+ "sha256": "b2b48ebab23085ce5e6a28b37c56d7cc75a25946355b78a7bd43f383eca33791",
39
+ "bytes": 171
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,13 @@
1
+ # ISO 2533 (Standard Atmosphere, ISO/TC 20/SC 6): the document family
2
+ # overriding the ISO default — the PROFILE + named FORMATS pattern.
3
+ profile: iso-2533
4
+ authority: ISO
5
+ schema: 1
6
+ inherits:
7
+ profile: iso-80000-1
8
+ formats:
9
+ iso-5: { precision: { policy: total, count: 5 }, notation: { primary: e }, exponent: { sign: plus, glyph: " " } }
10
+ iso-6:
11
+ extends: { format: iso-5 }
12
+ precision: { count: 6 }
13
+ nodecimal: { precision: { policy: fractional, count: 0 } }
@@ -0,0 +1,13 @@
1
+ # The ISO authority (default for ALL ISO documents unless overridden):
2
+ # comma in every language version (ISO/IEC Directives Part 2 §9.1),
3
+ # threes from the decimal sign, hanging digit isolated.
4
+ profile: iso-80000-1
5
+ authority: ISO
6
+ schema: 1
7
+ sources:
8
+ - { std: "ISO/IEC Directives Part 2", clause: "9.1", edition: "2021" }
9
+ - { std: "ISO 80000-1", edition: "2022" }
10
+ decimal: ","
11
+ grouping:
12
+ integer: { separator: " ", size: 3, hanging: isolate }
13
+ fraction: { separator: " ", size: 3, hanging: isolate }
@@ -0,0 +1,10 @@
1
+ # The ITU authority (ITU-T Editing Guidelines 9.4.3): apostrophe group
2
+ # separator; the decimal marker passes through the document language.
3
+ profile: itu
4
+ authority: ITU
5
+ schema: 1
6
+ sources:
7
+ - { std: "ITU Editing Guidelines", clause: "9.4.3" }
8
+ grouping:
9
+ integer: { separator: "'", size: 3, hanging: isolate }
10
+ fraction: { separator: null, size: 3, hanging: isolate }
@@ -0,0 +1,28 @@
1
+ # The engine's test profile: the spec-suite formats (not an authority).
2
+ profile: lab
3
+ authority: RHOELLA
4
+ schema: 1
5
+ formats:
6
+ sig6: { precision: { policy: significant, count: 6 } }
7
+ frac6: { precision: { policy: fractional, count: 6 } }
8
+ frac2: { precision: { policy: fractional, count: 2 } }
9
+ frac0-away: { precision: { policy: fractional, count: 0 } }
10
+ frac0-even: { precision: { policy: fractional, count: 0 }, rounding: { tie: even } }
11
+ tot5: { precision: { policy: total, count: 5 } }
12
+ tot8: { precision: { policy: total, count: 8 } }
13
+ sci: { notation: { primary: scientific } }
14
+ sciPlus: { notation: { primary: scientific }, exponent: { sign: plus } }
15
+ eng: { notation: { primary: engineering } }
16
+ eDef: { notation: { primary: e } }
17
+ eLow: { notation: { primary: e }, exponent: { glyph: "e" } }
18
+ carryE: { precision: { policy: total, count: 5 }, notation: { primary: e } }
19
+ flipE: { notation: { primary: basic, flip: [{ above: "1e6", use: e }] } }
20
+ hex: { radix: { base: 16 } }
21
+ hexU: { radix: { base: 16, case: upper } }
22
+ hexN: { radix: { base: 16, prefix: null } }
23
+ hexH: { radix: { base: 16, prefix: null, postfix: "h" } }
24
+ bin: { radix: { base: 2 } }
25
+ oct: { radix: { base: 8 } }
26
+ grpIso: { decimal: ",", grouping: { integer: { separator: " ", size: 3, hanging: isolate } } }
27
+ grpFold: { decimal: ",", grouping: { integer: { separator: " ", size: 3, hanging: fold } } }
28
+ iso-5-tight: { extends: { profile: iso-2533, format: iso-5 }, exponent: { glyph: "E" } }
@@ -0,0 +1,8 @@
1
+ # The flavor-less rendering surface (metanorma.org option examples):
2
+ # the language's decimal passes through; the language grouping is
3
+ # REMOVED — nil is the removal marker (SPEC §1), so an authority can
4
+ # switch a symbol surface off, not only override it.
5
+ profile: plain
6
+ authority: METANORMA
7
+ schema: 1
8
+ grouping: null
@@ -0,0 +1,14 @@
1
+ # The BIPM authority (often the base, not mandatory): language-keyed
2
+ # decimal (SI Brochure 5.4.4), non-breaking space groups, hanging digit
3
+ # folded ("1234 567.765 4321"; four-digit sides ungrouped).
4
+ profile: si-brochure
5
+ authority: BIPM
6
+ schema: 1
7
+ sources:
8
+ - { std: "BIPM SI Brochure", edition: "9th", clause: "5.4.4" }
9
+ decimal:
10
+ en: "."
11
+ fr: ","
12
+ grouping:
13
+ integer: { separator: " ", size: 3, hanging: fold }
14
+ fraction: { separator: " ", size: 3, hanging: fold }
@@ -0,0 +1,16 @@
1
+ # The neutral structure root (SPEC §2): TOTAL over structure keys.
2
+ # Symbol keys (decimal, grouping) live in the language profiles — the
3
+ # partitions are disjoint so composition cannot cancel accidentally.
4
+ profile: base
5
+ authority: METANORMA
6
+ schema: 1
7
+ sources:
8
+ - std: "Metanorma number formatting"
9
+ note: "the de-facto standard (metanorma.org author docs; semantic-elements #numbers)"
10
+ rounding: { strategy: round, tie: away }
11
+ precision: { policy: exact, count: null }
12
+ notation: { primary: basic, flip: null }
13
+ exponent: { glyph: "E", times: "×", sign: none }
14
+ signs: { negative: "-", positive: null }
15
+ leading_zero: true
16
+ radix: { base: 10, case: lower, prefix: auto, postfix: null }
@@ -0,0 +1,7 @@
1
+ # English symbol conventions (SPEC §2): TOTAL over symbol keys.
2
+ profile: language-en
3
+ schema: 1
4
+ decimal: "."
5
+ grouping:
6
+ integer: { separator: ",", size: 3, hanging: isolate }
7
+ fraction: { separator: null, size: 3, hanging: isolate }
@@ -0,0 +1,6 @@
1
+ profile: language-fr
2
+ schema: 1
3
+ decimal: ","
4
+ grouping:
5
+ integer: { separator: " ", size: 3, hanging: isolate }
6
+ fraction: { separator: null, size: 3, hanging: isolate }
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Rhoella
4
+ module Dictionaries
5
+ # The profiles directory the number-profile interpreter resolves as
6
+ # its gem data (Rhoella::Profiles gem_data_path requires
7
+ # "rhoella/dictionaries" and joins base.yml / languages /
8
+ # authorities under this path).
9
+ PATH = File.expand_path("../../../data/profiles", __dir__).freeze
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Rhoella
4
+ module Dictionaries
5
+ VERSION = "0.1.0"
6
+ end
7
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "dictionaries/version"
4
+
5
+ module Rhoella
6
+ # The sealed dictionaries data package (rhoella#30): the audited
7
+ # number-profile vocabulary (docs/number-profiles/SPEC.md) as
8
+ # checksum-sealed YAML — the neutral structure root, the language
9
+ # profiles, and the authority profiles (ISO/IEC Directives Part 2,
10
+ # SI Brochure, ITU, ISO 2533, plain). Pure data — no code beyond the
11
+ # package PATH constant, no dependencies. Install it alongside
12
+ # rhoella and the number-profile interpreter resolves its data
13
+ # automatically; without it the interpreter raises the named
14
+ # install-hint error.
15
+ module Dictionaries
16
+ end
17
+ end
18
+
19
+ require_relative "dictionaries/data"
metadata ADDED
@@ -0,0 +1,59 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rhoella-dictionaries
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Metanorma
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: 'rhoella-dictionaries — the audited number-profile vocabulary (docs/number-profiles/SPEC.md)
13
+ as checksum-sealed YAML: the neutral structure root, the language profiles, and
14
+ the authority profiles (ISO/IEC Directives Part 2, SI Brochure, ITU, ISO 2533, plain).
15
+ Pure data — no code beyond the package PATH constant, no dependencies. Install it
16
+ alongside rhoella and the number-profile interpreter resolves its data automatically;
17
+ without it the interpreter raises the named install-hint error.'
18
+ email:
19
+ - open.source@ribose.com
20
+ executables: []
21
+ extensions: []
22
+ extra_rdoc_files: []
23
+ files:
24
+ - README.md
25
+ - data/manifest.json
26
+ - data/profiles/authorities/iso-2533.yml
27
+ - data/profiles/authorities/iso-80000-1.yml
28
+ - data/profiles/authorities/itu.yml
29
+ - data/profiles/authorities/lab.yml
30
+ - data/profiles/authorities/plain.yml
31
+ - data/profiles/authorities/si-brochure.yml
32
+ - data/profiles/base.yml
33
+ - data/profiles/languages/en.yml
34
+ - data/profiles/languages/fr.yml
35
+ - lib/rhoella/dictionaries.rb
36
+ - lib/rhoella/dictionaries/data.rb
37
+ - lib/rhoella/dictionaries/version.rb
38
+ homepage: https://www.rhoella.org
39
+ licenses:
40
+ - BSD-2-Clause
41
+ metadata: {}
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '3.0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ requirements: []
56
+ rubygems_version: 4.0.20
57
+ specification_version: 4
58
+ summary: The sealed dictionaries data package for the rhoella fleet
59
+ test_files: []