A Reference is a record that points to a target. The target can be an entity, a concept, a document, or another Edge. It points by ID, not by name.

Layout

TAG WORD          000K KKKC CCCC LLLL      Sections 0~2 (0x000L~0x05FL)
[Length extension TAG]
[IMPORT ID]       for EXTERNAL-POINTER (1/2/4 WORD)
[Issuer]          for EXTERNAL-ISSUER (2/4/16 WORD)
[Document ID]     for EXTERNAL-ISSUER (4 WORD)
Target ID         all the rest
  • LLLL is the total number of WORDs including the TAG WORD, minus 1 (Record and TAG WORD).
  • Reference occupies 96 slots in sections 0~2 (w < 0x0600). Section 0 is entities 0x000L~0x01FL, section 1 is EXTERNAL 0x020L~0x03FL, and section 2 is other 0x040L~0x05FL.
  • The Codec is written as a code table (table below). In the 5Q scheme, one code carries both the identification scheme and the quantification. The quantification of REFERENCE-ISSUER is set by the Issuer’s document.
  • The target ID is an unsigned big-endian integer and is written in the shortest width. The width is what remains of Length after the preceding fields.
  • Target ID 0 is written as the 1 WORD 0x0000. Otherwise no 0x0000 WORD is placed in front.
  • The same integer value is the same ID. The width is not part of the ID.
  • Every Codec uses the shortest width. No Codec fixes the target ID width.
  • ISSUER-POINTER, DOC-POINTER, and CODEC-POINTER do not follow this layout. They have no target ID, and hold only the Issuer (and the document ID, codec ID, and version ID).
  • REFERENCE-ISSUER does not follow this layout either. It is TAG, Issuer, a 2 WORD codec number, and Payload. The Payload is set by the Codec document the Issuer published.

Codec

TAG IDNameCategoryTarget
0x000L~0x002LSlot markerSlot markerPoints to no target. Only a 1 WORD marker is used: 0x0000 ABSENT (not written), 0x0010 UNKNOWN-VALUE (unknown), 0x0020 NO-VALUE (none)
0x005L~0x009LLOCALDeclarationAn ID issued by this document
0x00AL~0x00ELGEULDeclarationAn entity issued by geul.org
0x00FL~0x013LGEUL-SIDXDeclarationA semantic-aligned identifier that carries meaning in its bits
0x014L~0x018LWIKIDATA-QIDDeclarationA Wikidata item. The integer after Q
0x019L~0x01DLWIKIDATA-PIDDeclarationA Wikidata property. The integer after P
0x020L~0x02ELEXTERNAL-POINTER-1/2/4WORDPointerA LOCAL ID in a document brought in by IMPORT
0x02FL~0x03DLEXTERNAL-ISSUER-2/4/16WORDPointer-declarationA LOCAL ID in a document published by an Issuer
0x040LISSUER-POINTERPointer-declarationAn Issuer itself
0x041LDOC-POINTERPointer-declarationOne version of a document published by an Issuer
0x042LCODEC-POINTERPointer-declarationOne version of a codec published by an Issuer
0x05DL~0x05FLREFERENCE-ISSUER-2/4/16WORDIssuer formDefined by the Issuer. The category and the target ID slots are set by the Issuer’s document
  • Reserved are 0x003L~0x004L, 0x01EL~0x01FL (section 0), 0x03EL~0x03FL (section 1), and 0x043L~0x05CL (section 2, slots for new identification schemes).
  • The scheme number is read from the offset within the section, C. In section 0, if 5 <= C < 30 the scheme is C / 5 (1~5); in section 1, if C < 30 the scheme is 6 + C / 5 (6~11).
SchemeNameIdentifiedGenericFree-choiceUniversalVariable
1LOCAL0x005L0x006L0x007L0x008L0x009L
2GEUL0x00AL0x00BL0x00CL0x00DL0x00EL
3GEUL-SIDX0x00FL0x010L0x011L0x012L0x013L
4WIKIDATA-QID0x014L0x015L0x016L0x017L0x018L
5WIKIDATA-PID0x019L0x01AL0x01BL0x01CL0x01DL
6EXTERNAL-POINTER-1WORD0x020L0x021L0x022L0x023L0x024L
7EXTERNAL-POINTER-2WORD0x025L0x026L0x027L0x028L0x029L
8EXTERNAL-POINTER-4WORD0x02AL0x02BL0x02CL0x02DL0x02EL
9EXTERNAL-ISSUER-2WORD0x02FL0x030L0x031L0x032L0x033L
10EXTERNAL-ISSUER-4WORD0x034L0x035L0x036L0x037L0x038L
11EXTERNAL-ISSUER-16WORD0x039L0x03AL0x03BL0x03CL0x03DL
  • A declaration directly identifies a target by an ID set by the issuing party.
  • A pointer points to a LOCAL in a document brought in by an IMPORT ID. The IMPORT ID width is set by the scheme: if the scheme − 6 is 0, 1, or 2, it is 1, 2, or 4 WORD.
  • A pointer-declaration points to another document and a target inside it with a single record, without IMPORT. The Issuer width of EXTERNAL-ISSUER is 2, 4, or 16 WORD if the scheme − 9 is 0, 1, or 2.
  • 0x020L~0x03DL (section 1, schemes 6~11) point to a LOCAL of another document. The other declaration schemes directly identify a target (a LOCAL of this document, an issued ID). The pointers (section 2, 0x040L~0x042L) point to an Issuer, a document, or a codec itself. REFERENCE-ISSUER is outside this distinction.
  • 0x000L~0x002L are codes assigned to slot markers, and are not used as a Reference that points to a target. The WORDs 0x0000, 0x0010, and 0x0020 (L 0, 1 WORD) are slot markers (0x0000 ABSENT, 0x0010 UNKNOWN-VALUE, 0x0020 NO-VALUE). A marker is valid only in a record field slot that has exactly that WORD as its CODEC target. It is not accepted by a wildcard or a field with no CODEC, and is invalid in a HEAD or BODY record slot and in an Edge Id slot. TAG forms with a Payload in C 0~2 (L ≥ 1) are Reserved.
  • Only the direct codes and publications provided by geul.org are CC0. An identification scheme that is not CC0 (such as WordNet) is not made a direct code. The license of an Issuer form is set by that Issuer.

Frequently used TAGs

RecordWORD
LOCAL 10051 0001
LOCAL 655360052 0001 0000
Wikidata Q5 (human)0141 0005
Wikidata Q6912830142 000A 8C53
Wikidata P31 (instance of)0191 001F
Slot marker ABSENT / UNKNOWN-VALUE / NO-VALUE0000 / 0010 / 0020

LOCAL

A LOCAL is an ID issued by this document.

  • It is unique. In a document, one LOCAL ID points to only one target.
  • 0 is not assigned. Target IDs are assigned from 1.
  • Assigning in increasing order is recommended (auto increment). The magnitude of an ID has no meaning.
  • It points to the same target across versions. A deleted ID is not reused (revision of the document).
  • To be pointed to from outside the document, the document must have a DOC-ID.
  • Different LOCAL IDs do not mean the targets are different in reality. Link them with a SAME-NODE Edge if they are the same, or a DIFFERENT-NODE Edge if they are different.

Edge Id

Every Edge places a LOCAL Reference as the first element of its Payload. That LOCAL ID is the Edge Id.

  • An Edge Id can be read without knowing the codebook.
  • A LOCAL in the Edge Id slot is a declaration, and a LOCAL in any other slot of the Edge is a mention.
  • A LOCAL that declares an Edge Id uses only Identified (0x005L).
  • Another Edge is pointed to by its Edge Id. An Edge of this document is pointed to by a LOCAL, and an Edge of another document by a pointer Reference.

Pointing to another document

WhatHow
An Issuer itselfISSUER-POINTER (Issuer)
One version of a documentDOC-POINTER (Issuer, document ID 4 WORD, version ID 2 WORD). Version 0 is the latest
One version of a codecCODEC-POINTER (Issuer, codec ID 2 WORD, version ID 2 WORD). Version 0 is the latest
A target in a published document (latest)EXTERNAL-ISSUER-* (Issuer, document ID, LOCAL ID)
A target in an imported document (edition pinned)Assign an IMPORT ID with Meta IMPORT-DOC and use EXTERNAL-POINTER-* (IMPORT ID, LOCAL ID)
  • A document itself is pointed to, whether from inside that document or outside it, only by a single DOC-POINTER. It points to itself with the DOC-POINTER of its own DOC-ID. A codec document is the exception and is pointed to by CODEC-POINTER (its DOC-ID is also a CODEC-POINTER).
  • EXTERNAL-ISSUER follows the latest version. To pin an edition, use IMPORT.
  • The Issuer is written in the shortest width that fits the value (2/4/16 WORD), and the Codec that matches that width is chosen. EXTERNAL-ISSUER and REFERENCE-ISSUER are the same.
  • Document ID 0 of each Issuer is reserved for the index document of the terms (tools, roles, and so on) that Issuer defines. The index document is recommended for every Issuer and is not required (Issuer and publication).

Example: LOCAL 7 in document 0x0000000000000002 of Issuer 0x00000002

02F7 0000 0002 0000 0000 0000 0002 0007

Quantifier

C % 5NameMeaningExample
0IdentifiedAn identified individualElon Musk, South Korea
1GenericA general statement about a whole kind. Allows exceptionsSoldiers obey orders
2Free-choiceAny target that satisfies the conditionAny soldier
3UniversalEvery target in the rangeEvery soldier
4VariableA discourse variablethat person, this woman
  • Quantification is read only in the 5Q schemes (schemes 1~11). With the offset within the section C, the quantification is C % 5 when 5 <= C < 30 in section 0 and when C < 30 in section 1. A section has 32 slots, so dividing the 9-bit Codec position (w >> 4) by 5 would misalign section 1. Markers (section 0, C < 3) and section 2 (pointers, REFERENCE-ISSUER) have no quantification. The marker 0x0010 UNKNOWN-VALUE is not Generic. The quantification of REFERENCE-ISSUER is set by the Codec document the Issuer published.
  • Unlike Universal, Generic does not mean it applies to every individual target without exception. A definitional expression such as “what is a soldier” can be written as Generic. When a strict definition of a concept or classification is needed, make it concrete with a separate relation.
  • The scope and negation of a quantification are set not by the Reference but by the Edge that uses it.
  • A Variable is a target in the discourse whose kind is known but which has not yet been identified.
    • A named variable attaches Variable to a LOCAL. The same LOCAL ID is the same variable. The kind is linked by an Edge.
    • An anonymous variable attaches Variable to a declaration Codec that points to a kind (GEUL, WIKIDATA-*) (for example, Wikidata “president” + Variable). Coreference is not tracked and it cannot be pointed to again. Anonymous variables are not treated as the same variable.
    • When the target is later confirmed, link the variable to that target with SAME-NODE. Every expression that points to the same variable is then interpreted as that target together.
    • Even different variables do not mean the actual targets are different. Link them with SAME-NODE if they are the same, or DIFFERENT-NODE if they are different.
    • The Variable of an external pointer Codec (EXTERNAL-POINTER-, EXTERNAL-ISSUER-) is a LOCAL variable of the document it points to.
    • Example: in “The president gave a speech”, if the person is not determined, use the “president” Variable. To mention it again, place a LOCAL Variable and link the kind “president” by an Edge. If it is later confirmed to be Obama, link that variable to Obama Identified with SAME-NODE. Every expression that points to the same variable is interpreted as Obama together.
  • Example: using Wikidata Q5 (human) as Generic gives 0151 0005 (“Humans are …”).

REFERENCE-ISSUER

REFERENCE-ISSUER is a Reference form defined by an Issuer. It is the last three slots of the Reference range. The layout is the same as ISSUER in Value and Edge (Record and TAG WORD).

Layout

TAG WORD          0000 0101 11WW LLLL      Codec 0x05DL / 0x05EL / 0x05FL (WW = Issuer width: 01 2, 10 4, 11 16 WORD)
[Length extension TAG]
Issuer            2/4/16 WORD (the Codec sets the width)
Codec number      2 WORD. Defined by the Issuer
Payload           Set by the Codec document the Issuer published
CodecNameIssuer width
0x05DLREFERENCE-ISSUER-2WORD2 WORD
0x05ELREFERENCE-ISSUER-4WORD4 WORD
0x05FLREFERENCE-ISSUER-16WORD16 WORD

Interpretation and validity

  • GEUL knows only the Payload boundary from Length. The Payload is not interpreted without a codebook.
  • The meaning and quantification of the codec number are set by the Issuer. What it points to is also set by the Codec document the Issuer published.
  • The common Reference rules do not apply: the shortest width of the target ID, the 1 WORD notation of target ID 0, the Quantifier, the reading of quantification and scheme from the offset within the section, the declaration and pointer classification, and what it points to.
  • The 2 WORD codec number is the same as ISSUER in Value and Edge. If the numbers run out, obtain one more Issuer.
  • A decoder that does not know the form knows the Kind, Length, Issuer, and codec number, and skips the rest by Length.
  • The license of an Issuer form is set by that Issuer (Issuer and publication).

Related pages