tbx 0.1.1 → 0.1.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.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +1 -1
  3. data/CHANGELOG.md +32 -0
  4. data/CLAUDE.md +21 -1
  5. data/README.adoc +365 -19
  6. data/lib/tbx/admin.rb +24 -11
  7. data/lib/tbx/admin_grp.rb +5 -0
  8. data/lib/tbx/admin_note.rb +14 -6
  9. data/lib/tbx/back.rb +5 -0
  10. data/lib/tbx/body.rb +3 -0
  11. data/lib/tbx/change.rb +6 -0
  12. data/lib/tbx/concept_entry.rb +10 -0
  13. data/lib/tbx/data_element.rb +50 -0
  14. data/lib/tbx/date.rb +6 -0
  15. data/lib/tbx/descrip.rb +23 -11
  16. data/lib/tbx/descrip_grp.rb +7 -0
  17. data/lib/tbx/descrip_note.rb +6 -6
  18. data/lib/tbx/document.rb +12 -0
  19. data/lib/tbx/ec.rb +16 -0
  20. data/lib/tbx/encoding_desc.rb +3 -0
  21. data/lib/tbx/file_desc.rb +6 -0
  22. data/lib/tbx/foreign.rb +6 -0
  23. data/lib/tbx/hi.rb +18 -0
  24. data/lib/tbx/item.rb +6 -0
  25. data/lib/tbx/item_grp.rb +6 -0
  26. data/lib/tbx/item_set.rb +6 -0
  27. data/lib/tbx/lang_sec.rb +6 -0
  28. data/lib/tbx/modules/basic.rb +92 -0
  29. data/lib/tbx/modules/core_types.rb +23 -0
  30. data/lib/tbx/modules/linguist.rb +46 -0
  31. data/lib/tbx/modules/min.rb +46 -0
  32. data/lib/tbx/namespace.rb +5 -0
  33. data/lib/tbx/note.rb +9 -0
  34. data/lib/tbx/p.rb +9 -0
  35. data/lib/tbx/ph.rb +6 -0
  36. data/lib/tbx/publication_stmt.rb +3 -0
  37. data/lib/tbx/ref.rb +17 -6
  38. data/lib/tbx/ref_object.rb +6 -0
  39. data/lib/tbx/ref_object_sec.rb +6 -0
  40. data/lib/tbx/revision_desc.rb +3 -0
  41. data/lib/tbx/sc.rb +9 -6
  42. data/lib/tbx/source_desc.rb +3 -0
  43. data/lib/tbx/tbx_header.rb +7 -0
  44. data/lib/tbx/term.rb +6 -0
  45. data/lib/tbx/term_comp.rb +26 -0
  46. data/lib/tbx/term_comp_grp.rb +24 -0
  47. data/lib/tbx/term_comp_sec.rb +45 -0
  48. data/lib/tbx/term_note.rb +44 -11
  49. data/lib/tbx/term_note_grp.rb +7 -0
  50. data/lib/tbx/term_sec.rb +8 -0
  51. data/lib/tbx/text_element.rb +5 -0
  52. data/lib/tbx/title.rb +6 -0
  53. data/lib/tbx/title_stmt.rb +3 -0
  54. data/lib/tbx/transac.rb +17 -6
  55. data/lib/tbx/transac_grp.rb +6 -0
  56. data/lib/tbx/transac_note.rb +17 -6
  57. data/lib/tbx/version.rb +1 -1
  58. data/lib/tbx/xref.rb +16 -0
  59. data/lib/tbx.rb +13 -0
  60. data/reference-docs/README.adoc +109 -0
  61. data/reference-docs/schemas/Basic_Module_Definition.pdf +0 -0
  62. data/reference-docs/schemas/Min_Module_Definition.pdf +0 -0
  63. data/reference-docs/schemas/TBX-Basic_ImplementationGuide/TBX-Basic_ImplementationGuide.pdf +0 -0
  64. data/reference-docs/schemas/TBX-Core_dialect/Schemas/Example_Astronomy_DCA_VALID.tbx +710 -0
  65. data/reference-docs/schemas/TBX-Core_dialect/Schemas/TBX-Core.sch +47 -0
  66. data/reference-docs/schemas/TBX-Core_dialect/Schemas/TBXcoreStructV03_TBX-Core_integrated.rng +1171 -0
  67. data/reference-docs/schemas/TBX-Core_dialect/TBX-Core Definition.pdf +0 -0
  68. data/reference-docs/schemas/TBX-Linguist_dialect/DCA/Example_Astronomy_DCA_VALID.tbx +4028 -0
  69. data/reference-docs/schemas/TBX-Linguist_dialect/DCA/TBX-Linguist_DCA.sch +146 -0
  70. data/reference-docs/schemas/TBX-Linguist_dialect/DCA/TBXcoreStructV03_TBX-Linguist_integrated.rng +1198 -0
  71. data/reference-docs/schemas/TBX-Linguist_dialect/DCT/Example_Astronomy_DCT_VALID.tbx +4019 -0
  72. data/reference-docs/schemas/TBX-Linguist_dialect/DCT/TBX-Linguist.nvdl +41 -0
  73. data/reference-docs/schemas/TBX-Linguist_dialect/DCT/TBX-Linguist_DCT.sch +48 -0
  74. data/reference-docs/schemas/TBX-Linguist_dialect/TBX-Linguist Definition.pdf +0 -0
  75. data/reference-docs/schemas/TBX-Min_dialect/DCA/TBX-Min_DCA.sch +82 -0
  76. data/reference-docs/schemas/TBX-Min_dialect/DCT/TBX-Min.nvdl +25 -0
  77. data/reference-docs/schemas/TBX-Min_dialect/DCT/TBX-Min_DCT.sch +48 -0
  78. data/reference-docs/schemas/TBX-Min_dialect/TBX-Min Definition.pdf +0 -0
  79. data/reference-docs/schemas/TBX_linguist_module/Linguist Module Definition.pdf +0 -0
  80. data/reference-docs/schemas/TBX_linguist_module/Linguist.rng +93 -0
  81. data/reference-docs/schemas/TBX_linguist_module/Linguist.sch +33 -0
  82. data/reference-docs/schemas/TBX_linguist_module/Linguist.tbxmd +47 -0
  83. data/reference-docs/schemas/TBX_module_description_xml/TBX Module Description.pdf +0 -0
  84. data/reference-docs/schemas/TBX_module_description_xml/tbxmd.rng +192 -0
  85. data/reference-docs/schemas/TBX_termComp_module/TermComp-namespace.rng +156 -0
  86. metadata +36 -2
data/lib/tbx/sc.rb CHANGED
@@ -1,12 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # XLIFF inline start-code marker `<sc>`.
5
+ #
6
+ # Used for representing inline formatting codes from source formats.
7
+ # The `id` is required and is referenced by a corresponding `<ec>`
8
+ # element's `startRef`.
9
+ #
10
+ # Attributes per core RNG: `id` (required, type ID), `isolated` (optional,
11
+ # yes/no).
12
+ # Schema source: TBXcoreStructV03.rng `<define name="sc">`
4
13
  class Sc < Lutaml::Model::Serializable
5
14
  attribute :id, :string
6
15
  attribute :isolated, :string
7
- attribute :type, :string
8
- attribute :subtype, :string
9
- attribute :target, :string
10
16
 
11
17
  xml do
12
18
  root "sc"
@@ -14,9 +20,6 @@ module Tbx
14
20
 
15
21
  map_attribute "id", to: :id
16
22
  map_attribute "isolated", to: :isolated
17
- map_attribute "type", to: :type
18
- map_attribute "subtype", to: :subtype
19
- map_attribute "target", to: :target
20
23
  end
21
24
  end
22
25
  end
@@ -1,6 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # Source description `<sourceDesc>`.
5
+ #
6
+ # Schema source: TBXcoreStructV03.rng `<define name="sourceDesc">`
4
7
  class SourceDesc < Lutaml::Model::Serializable
5
8
  attribute :id, :string
6
9
  attribute :lang, Lutaml::Xml::W3c::XmlLangType
@@ -1,6 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # Document header `<tbxHeader>`.
5
+ #
6
+ # Contains file description, encoding information, and revision history.
7
+ # Children: `fileDesc` (required), `encodingDesc` (optional),
8
+ # `revisionDesc` (optional).
9
+ #
10
+ # Schema source: TBXcoreStructV03.rng `<define name="tbxHeader">`
4
11
  class TbxHeader < Lutaml::Model::Serializable
5
12
  attribute :id, :string
6
13
  attribute :file_desc, ::Tbx::FileDesc
data/lib/tbx/term.rb CHANGED
@@ -1,6 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # The term designation element `<term>`.
5
+ #
6
+ # Contains the actual term text. Content is limited to plain text and
7
+ # `<hi>` inline highlighting elements per the `entity.basicText` pattern.
8
+ #
9
+ # Schema source: TBXcoreStructV03.rng `<define name="term">`
4
10
  class Term < Lutaml::Model::Serializable
5
11
  attribute :id, :string
6
12
  attribute :content, :string, collection: true
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tbx
4
+ # A single component of a decomposed term `<termComp>`.
5
+ #
6
+ # Used for representing hyphenation, syllabification, morphological
7
+ # elements, lemmata, or other logically significant portions of a term.
8
+ # Content is plain text only.
9
+ #
10
+ # Schema source: TermComp-namespace.rng `<define name="termComp">`
11
+ class TermComp < Lutaml::Model::Serializable
12
+ attribute :id, :string
13
+ attribute :lang, Lutaml::Xml::W3c::XmlLangType
14
+ attribute :content, :string, collection: true
15
+
16
+ xml do
17
+ root "termComp"
18
+ mixed_content
19
+ namespace ::Tbx::Namespace
20
+
21
+ map_attribute "id", to: :id
22
+ w3c_attributes :lang
23
+ map_content to: :content
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tbx
4
+ # Term component group `<termCompGrp>`.
5
+ #
6
+ # Groups a `<termComp>` with associated `<note>` elements.
7
+ #
8
+ # Schema source: TermComp-namespace.rng `<define name="termCompGrp">`
9
+ class TermCompGrp < Lutaml::Model::Serializable
10
+ attribute :id, :string
11
+ attribute :term_comp, ::Tbx::TermComp
12
+ attribute :note, ::Tbx::Note, collection: true
13
+
14
+ xml do
15
+ root "termCompGrp"
16
+ mixed_content
17
+ namespace ::Tbx::Namespace
18
+
19
+ map_attribute "id", to: :id
20
+ map_element "termComp", to: :term_comp
21
+ map_element "note", to: :note
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tbx
4
+ # Term component section `<termCompSec>`.
5
+ #
6
+ # Section containing decomposed term components. The `type` attribute
7
+ # indicates the decomposition method.
8
+ #
9
+ # Permitted `type` values (from TermComp-namespace.rng):
10
+ #
11
+ # * `hyphenation` — parts of a term as it would be hyphenated
12
+ # * `lemma` — base form (dictionary entry form)
13
+ # * `morphologicalElement` — individual morphemes comprising the term
14
+ # * `syllabification` — individual syllables comprising the term
15
+ # * `termElement` — any other logically significant portion
16
+ #
17
+ # Schema source: TermComp-namespace.rng `<define name="termCompSec">`
18
+ class TermCompSec < Lutaml::Model::Serializable
19
+ TYPES = {
20
+ hyphenation: "hyphenation",
21
+ lemma: "lemma",
22
+ morphological_element: "morphologicalElement",
23
+ syllabification: "syllabification",
24
+ term_element: "termElement",
25
+ }.freeze
26
+
27
+ attribute :id, :string
28
+ attribute :type, :string
29
+ attribute :note, ::Tbx::Note, collection: true
30
+ attribute :term_comp, ::Tbx::TermComp, collection: true
31
+ attribute :term_comp_grp, ::Tbx::TermCompGrp, collection: true
32
+
33
+ xml do
34
+ root "termCompSec"
35
+ mixed_content
36
+ namespace ::Tbx::Namespace
37
+
38
+ map_attribute "id", to: :id
39
+ map_attribute "type", to: :type
40
+ map_element "note", to: :note
41
+ map_element "termComp", to: :term_comp
42
+ map_element "termCompGrp", to: :term_comp_grp
43
+ end
44
+ end
45
+ end
data/lib/tbx/term_note.rb CHANGED
@@ -1,18 +1,51 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # Term-level data category element `<termNote>`.
5
+ #
6
+ # Carries grammatical, administrative, and usage information about a term.
7
+ # Only allowed as a child of `<termSec>` or `<termNoteGrp>`.
8
+ #
9
+ # Permitted `type` values (composed from all modules):
10
+ #
11
+ # * Min module: `administrativeStatus` (picklist: admittedTerm-admn-sts,
12
+ # deprecatedTerm-admn-sts, supersededTerm-admn-sts, preferredTerm-admn-sts),
13
+ # `partOfSpeech` (picklist: adjective, noun, other, verb, adverb)
14
+ # * Basic module: `geographicalUsage` (string), `grammaticalGender`
15
+ # (picklist: masculine, feminine, neuter, other), `termLocation`
16
+ # (picklist: 18 UI element types), `termType` (picklist: fullForm,
17
+ # acronym, abbreviation, shortForm, variant, phrase)
18
+ # * Linguist module: `grammaticalNumber` (picklist: singular, plural, dual,
19
+ # mass, otherNumber), `register` (picklist: colloquialRegister,
20
+ # neutralRegister, technicalRegister, in-houseRegister,
21
+ # bench-levelRegister, slangRegister, vulgarRegister),
22
+ # `transferComment` (string)
23
+ #
24
+ # Content model: `entity.noteText` (mixed text + inline elements hi, ec,
25
+ # foreign, ph, sc).
26
+ #
27
+ # @see TYPES
28
+ #
29
+ # Schema source: TBXcoreStructV03.rng `<define name="termNote">`;
30
+ # data categories: Min.tbxmd, Basic.tbxmd, Linguist.tbxmd;
31
+ # permitted types validated by DCA Schematron (e.g. TBX-Basic_DCA.sch).
4
32
  class TermNote < Lutaml::Model::Serializable
5
- attribute :id, :string
6
- attribute :lang, Lutaml::Xml::W3c::XmlLangType
7
- attribute :target, :string
8
- attribute :datatype, :string
9
- attribute :type, :string
10
- attribute :content, :string, collection: true
11
- attribute :hi, ::Tbx::Hi, collection: true
12
- attribute :ec, ::Tbx::Ec, collection: true
13
- attribute :foreign, ::Tbx::Foreign, collection: true
14
- attribute :ph, ::Tbx::Ph, collection: true
15
- attribute :sc, ::Tbx::Sc, collection: true
33
+ include Tbx::DataElement
34
+ include Tbx::DataElement::InlineContent
35
+
36
+ # Permitted termNote/@type values per TBX-Basic DCA Schematron
37
+ # (ISO 30042:2019, TBX-Basic dialect, DCA style).
38
+ #
39
+ # Source: reference-docs/schemas/TBX-Basic_DCA.sch line 54-56
40
+ # "Permitted type value(s): administrativeStatus, partOfSpeech,
41
+ # geographicalUsage, grammaticalGender, termLocation, termType"
42
+ TYPES = Modules::Min::TERM_NOTE_TYPES
43
+ .merge(Modules::Basic::TERM_NOTE_TYPES)
44
+ .merge(Modules::Linguist::TERM_NOTE_TYPES).freeze
45
+
46
+ VALUES = Modules::Min::TERM_NOTE_VALUES
47
+ .merge(Modules::Basic::TERM_NOTE_VALUES)
48
+ .merge(Modules::Linguist::TERM_NOTE_VALUES).freeze
16
49
 
17
50
  xml do
18
51
  root "termNote"
@@ -1,6 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # Groups a `<termNote>` with its associated administrative data and
5
+ # references.
6
+ #
7
+ # Children: `termNote` (required), then entity.noteLinkInfo (admin,
8
+ # adminGrp, note, ref, transacGrp, xref).
9
+ #
10
+ # Schema source: TBXcoreStructV03.rng `<define name="termNoteGrp">`
4
11
  class TermNoteGrp < Lutaml::Model::Serializable
5
12
  attribute :id, :string
6
13
  attribute :term_note, ::Tbx::TermNote
data/lib/tbx/term_sec.rb CHANGED
@@ -1,6 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # Term section `<termSec>`.
5
+ #
6
+ # Contains a single term designation and its associated term-level notes
7
+ # and administrative data. Children: `term` (required), then
8
+ # termNote/termNoteGrp, then auxInfo elements (admin, adminGrp, descrip,
9
+ # descripGrp, note, ref, transacGrp, xref).
10
+ #
11
+ # Schema source: TBXcoreStructV03.rng `<define name="termSec">`
4
12
  class TermSec < Lutaml::Model::Serializable
5
13
  attribute :id, :string
6
14
  attribute :term, ::Tbx::Term
@@ -1,6 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # Wrapper element `<text>` for the termbase body and back matter.
5
+ #
6
+ # Children: `body` (optional), `back` (optional).
7
+ #
8
+ # Schema source: TBXcoreStructV03.rng `<define name="text">`
4
9
  class TextElement < Lutaml::Model::Serializable
5
10
  attribute :id, :string
6
11
  attribute :body, ::Tbx::Body
data/lib/tbx/title.rb CHANGED
@@ -1,6 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # Title element `<title>`.
5
+ #
6
+ # Used within `<titleStmt>` to specify the title of the TBX file.
7
+ # Content is plain text only.
8
+ #
9
+ # Schema source: TBXcoreStructV03.rng `<define name="title">`
4
10
  class Title < Lutaml::Model::Serializable
5
11
  attribute :id, :string
6
12
  attribute :lang, Lutaml::Xml::W3c::XmlLangType
@@ -1,6 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # Title statement `<titleStmt>`.
5
+ #
6
+ # Schema source: TBXcoreStructV03.rng `<define name="titleStmt">`
4
7
  class TitleStmt < Lutaml::Model::Serializable
5
8
  attribute :id, :string
6
9
  attribute :lang, Lutaml::Xml::W3c::XmlLangType
data/lib/tbx/transac.rb CHANGED
@@ -1,13 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # Transaction element `<transac>`.
5
+ #
6
+ # Records an action performed on a terminological entry. The content
7
+ # indicates the type of transaction (origination or modification).
8
+ #
9
+ # Permitted `type` values:
10
+ #
11
+ # * Basic module: `transactionType` (picklist: `origination`, `modification`)
12
+ #
13
+ # Content is plain text only (no inline elements per the core RNG).
14
+ #
15
+ # Schema source: TBXcoreStructV03.rng `<define name="transac">`;
16
+ # data category: Basic.tbxmd.
4
17
  class Transac < Lutaml::Model::Serializable
5
- attribute :id, :string
6
- attribute :lang, Lutaml::Xml::W3c::XmlLangType
7
- attribute :target, :string
8
- attribute :datatype, :string
9
- attribute :type, :string
10
- attribute :content, :string, collection: true
18
+ include Tbx::DataElement
19
+
20
+ TYPES = Modules::Basic::TRANSAC_TYPES.freeze
21
+ VALUES = Modules::Basic::TRANSAC_VALUES.freeze
11
22
 
12
23
  xml do
13
24
  root "transac"
@@ -1,6 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # Groups a `<transac>` transaction element with its date and
5
+ # responsibility information.
6
+ #
7
+ # Children: `transac` (required), then date, note, ref, transacNote, xref.
8
+ #
9
+ # Schema source: TBXcoreStructV03.rng `<define name="transacGrp">`
4
10
  class TransacGrp < Lutaml::Model::Serializable
5
11
  attribute :id, :string
6
12
  attribute :transac, ::Tbx::Transac
@@ -1,13 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # Transaction note element `<transacNote>`.
5
+ #
6
+ # Provides additional information about a transaction, typically identifying
7
+ # the person or organization responsible.
8
+ #
9
+ # Permitted `type` values:
10
+ #
11
+ # * Basic module: `responsibility` — person/org responsible for the
12
+ # transaction (DC-451)
13
+ #
14
+ # Content is plain text only (no inline elements per the core RNG).
15
+ #
16
+ # Schema source: TBXcoreStructV03.rng `<define name="transacNote">`;
17
+ # data category: Basic.tbxmd.
4
18
  class TransacNote < Lutaml::Model::Serializable
5
- attribute :id, :string
6
- attribute :lang, Lutaml::Xml::W3c::XmlLangType
7
- attribute :target, :string
8
- attribute :datatype, :string
9
- attribute :type, :string
10
- attribute :content, :string, collection: true
19
+ include Tbx::DataElement
20
+
21
+ TYPES = Modules::Basic::TRANSAC_NOTE_TYPES.freeze
11
22
 
12
23
  xml do
13
24
  root "transacNote"
data/lib/tbx/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
data/lib/tbx/xref.rb CHANGED
@@ -1,7 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tbx
4
+ # External cross-reference element `<xref>`.
5
+ #
6
+ # The `target` attribute holds a URI (http/https) pointing to an external
7
+ # resource. Unlike `Ref`, which uses IDREF for internal references, Xref
8
+ # uses anyURI for external resources.
9
+ #
10
+ # Permitted `type` values:
11
+ #
12
+ # * Min module: `externalCrossReference` — reference to an external resource
13
+ # * Basic module: `externalCrossReference` — external reference (DC-226),
14
+ # `xGraphic` — graphic image associated with the concept (DC-2920)
15
+ #
16
+ # Schema source: TBXcoreStructV03.rng `<define name="xref">`;
17
+ # data categories: Basic.tbxmd.
4
18
  class Xref < Lutaml::Model::Serializable
19
+ TYPES = Modules::Min::XREF_TYPES
20
+ .merge(Modules::Basic::XREF_TYPES).freeze
5
21
  attribute :id, :string
6
22
  attribute :target, :string
7
23
  attribute :type, :string
data/lib/tbx.rb CHANGED
@@ -4,6 +4,13 @@ require "lutaml/model"
4
4
  require_relative "tbx/version"
5
5
 
6
6
  module Tbx
7
+ module Modules
8
+ autoload :Min, "#{__dir__}/tbx/modules/min"
9
+ autoload :Basic, "#{__dir__}/tbx/modules/basic"
10
+ autoload :Linguist, "#{__dir__}/tbx/modules/linguist"
11
+ autoload :CoreTypes, "#{__dir__}/tbx/modules/core_types"
12
+ end
13
+
7
14
  autoload :Namespace, "#{__dir__}/tbx/namespace"
8
15
 
9
16
  # Inline elements
@@ -18,6 +25,9 @@ module Tbx
18
25
  autoload :P, "#{__dir__}/tbx/p"
19
26
  autoload :Title, "#{__dir__}/tbx/title"
20
27
 
28
+ # Shared concerns
29
+ autoload :DataElement, "#{__dir__}/tbx/data_element"
30
+
21
31
  # Data elements
22
32
  autoload :Admin, "#{__dir__}/tbx/admin"
23
33
  autoload :AdminGrp, "#{__dir__}/tbx/admin_grp"
@@ -45,6 +55,9 @@ module Tbx
45
55
 
46
56
  # Structural elements
47
57
  autoload :Term, "#{__dir__}/tbx/term"
58
+ autoload :TermComp, "#{__dir__}/tbx/term_comp"
59
+ autoload :TermCompGrp, "#{__dir__}/tbx/term_comp_grp"
60
+ autoload :TermCompSec, "#{__dir__}/tbx/term_comp_sec"
48
61
  autoload :TermSec, "#{__dir__}/tbx/term_sec"
49
62
  autoload :LangSec, "#{__dir__}/tbx/lang_sec"
50
63
  autoload :ConceptEntry, "#{__dir__}/tbx/concept_entry"
@@ -0,0 +1,109 @@
1
+ = Reference Documentation
2
+
3
+ This directory contains official TBX schema, dialect, and module reference
4
+ files from https://ltac-global.org[LTAC Global] (LTAC-Global on GitHub).
5
+
6
+ == Source repositories
7
+
8
+ All files below are sourced from the
9
+ https://github.com/LTAC-Global[LTAC-Global GitHub organization] and are
10
+ used under their respective licenses for reference purposes.
11
+
12
+ === Dialects
13
+
14
+ Dialects define a specific profile of TBX with Schematron constraints,
15
+ RELAX NG schemas, and example files.
16
+
17
+ |===
18
+ | Directory | Source repository | Description
19
+
20
+ | `schemas/TBX-Basic_dialect_v1/`
21
+ | https://github.com/LTAC-Global/TBX-Basic_dialect[TBX-Basic_dialect]
22
+ | TBX-Basic dialect (DCA + DCT schemas, example files, bundled modules)
23
+
24
+ | `schemas/TBX-Min_dialect/`
25
+ | https://github.com/LTAC-Global/TBX-Min_dialect[TBX-Min_dialect]
26
+ | TBX-Min dialect (DCA + DCT Schematron, NVDL)
27
+
28
+ | `schemas/TBX-Core_dialect/`
29
+ | https://github.com/LTAC-Global/TBX-Core_dialect[TBX-Core_dialect]
30
+ | TBX-Core dialect (integrated RNG, Schematron, example)
31
+
32
+ | `schemas/TBX-Linguist_dialect/`
33
+ | https://github.com/LTAC-Global/TBX-Linguist_dialect[TBX-Linguist_dialect]
34
+ | TBX-Linguist dialect (DCA + DCT Schematron, integrated RNG, examples)
35
+ |===
36
+
37
+ === Modules
38
+
39
+ Modules define data categories and structural rules for a specific level
40
+ of terminological detail.
41
+
42
+ |===
43
+ | Directory | Source repository | Key files
44
+
45
+ | `schemas/TBX-Basic_dialect_v1/Modules/TBX_min_module/`
46
+ | https://github.com/LTAC-Global/TBX_min_module[TBX_min_module]
47
+ | `Min.rng`, `Min.sch`, `Min.tbxmd`
48
+
49
+ | `schemas/TBX-Basic_dialect_v1/Modules/TBX_basic_module/`
50
+ | https://github.com/LTAC-Global/TBX_basic_module[TBX_basic_module]
51
+ | `Basic.rng`, `Basic.sch`, `Basic.tbxmd`
52
+
53
+ | `schemas/TBX_linguist_module/`
54
+ | https://github.com/LTAC-Global/TBX_linguist_module[TBX_linguist_module]
55
+ | `Linguist.rng`, `Linguist.sch`, `Linguist.tbxmd`
56
+
57
+ | `schemas/TBX_termComp_module/`
58
+ | https://github.com/LTAC-Global/TBX_termComp_module[TBX_termComp_module]
59
+ | `TermComp-namespace.rng`
60
+ |===
61
+
62
+ === Core schema
63
+
64
+ |===
65
+ | File | Source repository | Description
66
+
67
+ | `schemas/TBXcoreStructV03.rng`
68
+ | https://github.com/LTAC-Global/TBX_core_module[TBX_core_module]
69
+ | TBX core structural RELAX NG schema
70
+
71
+ | `schemas/TBX_core.xsd`
72
+ | https://github.com/LTAC-Global/TBX_core_module[TBX_core_module]
73
+ | TBX core XML Schema (XSD)
74
+ |===
75
+
76
+ === Module description format
77
+
78
+ |===
79
+ | Directory | Source repository | Key files
80
+
81
+ | `schemas/TBX_module_description_xml/`
82
+ | https://github.com/LTAC-Global/TBX_module_description_xml[TBX_module_description_xml]
83
+ | `tbxmd.rng` -- RELAX NG schema for `.tbxmd` module definition files
84
+ |===
85
+
86
+ === Implementation guide
87
+
88
+ |===
89
+ | Directory | Source repository | Key files
90
+
91
+ | `schemas/TBX-Basic_ImplementationGuide/`
92
+ | https://github.com/LTAC-Global/TBX-Basic_ImplementationGuide[TBX-Basic_ImplementationGuide]
93
+ | `TBX-Basic_ImplementationGuide.pdf`
94
+ |===
95
+
96
+ == TBX module hierarchy
97
+
98
+ The TBX standard (ISO 30042:2019) defines a modular architecture:
99
+
100
+ ....
101
+ TBX-Core structural foundation (element definitions)
102
+ +-- TBX-Min minimal data categories for basic terminology
103
+ +-- TBX-Basic standard data categories for general terminology
104
+ +-- TBX-Linguist extended data categories for linguistic detail
105
+ +-- TBX-TermComp term composition and decomposition
106
+ ....
107
+
108
+ Each dialect (TBX-Min, TBX-Basic, etc.) combines the core structure with
109
+ one or more modules and adds dialect-specific Schematron constraints.