Skip to content

Commit

Permalink
Merge pull request #142 from jmccrae/issue-140
Browse files Browse the repository at this point in the history
Changs to the Etymology Module
  • Loading branch information
mjakubicek authored Sep 5, 2024
2 parents faa8d74 + 2b508df commit 3932b13
Show file tree
Hide file tree
Showing 24 changed files with 117 additions and 40 deletions.
31 changes: 31 additions & 0 deletions dmlex-v1.0/specification/modules/etymology/extensions/sameAs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "../../../docbook/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
]>

<section id="etymology_sameAs">
<title>Extensions to <code>sameAs</code></title>
<para>
Extends the <code><olink targetptr="values_sameAs">sameAs</olink></code> object type
from the <olink targetptr="values">Controlled Values Module</olink>.
</para>

<itemizedlist>
<title>Can additionally be a property of</title>
<listitem>
<para><literal><olink targetptr="linking_relationTypeTag">etymonLanguage</olink></literal></para>
</listitem>
<listitem>
<para><literal><olink targetptr="linking_memberRoletag">etymonType</olink></literal></para>
</listitem>
</itemizedlist>

<example>
<title>Relational database</title>
<graphic fileref="modules/linking/databaseDiagrams/sameAs.svg" contentwidth="16cm"/>
</example>

</section>
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@
<para><literal><olink targetptr="etymology_etymonUnit">etymonUnit</olink></literal>
<glossterm>required</glossterm> (one or more) and <glossterm>unique</glossterm>.</para>
</listitem>
<listitem>
<para><literal>translation</literal>
<glossterm>optional</glossterm> (zero or one). Normalised string. A translation or
gloss of the etymon in the language of the lexicographic resource.</para>
</listitem>
<listitem>
<para><literal>listingOrder</literal>
<glossterm>required</glossterm> (exactly one). Number. The position of this origin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
<glossterm>optional</glossterm> (zero or one). Normalised string. The name of the etymon
language, in the language of the lexicographic resource.</para>
</listitem>
<listitem>
<para><literal><olink targetptr="etymology_sameAs">sameAs</olink></literal>
<glossterm>optional</glossterm> (zero or more).</para>
</listitem>
</itemizedlist>

<note>
Expand All @@ -48,6 +52,7 @@
<programlisting>
&lt;etymonLanguage langCode="..."&gt;
&lt;displayName&gt;...&lt;displayName&gt;
&lt;sameAs.../&gt;
&lt;/etymonLanguage&gt;
</programlisting>
</example>
Expand All @@ -57,7 +62,8 @@
<programlisting>
{
"langCode": "..." ,
"displayName": "..."
"displayName": "...",
"sameAs": [ ... ]
}
</programlisting>
</example>
Expand All @@ -66,7 +72,8 @@
<title>RDF</title>
<programlisting>
&lt;#etymonLanguage&gt; dmlex:langCode "..." ;
dmlex:displayName "... " .
dmlex:displayName "... " ;
dmlex:sameAs ... .
</programlisting>
</example>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
<glossterm>optional</glossterm> (zero or one). Normalised string. A human-readable
explanation of this type.</para>
</listitem>
<listitem>
<para><literal><olink targetptr="etymology_sameAs">sameAs</olink></literal>
<glossterm>optional</glossterm> (zero or more).</para>
</listitem>
</itemizedlist>

<example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
<xi:include href="objectTypes/etymonType.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="objectTypes/etymonLanguage.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="extensions/partOfSpeech.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="extensions/sameAs.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

</section>
17 changes: 14 additions & 3 deletions dmlex-v1.0/specification/schemas/JSON/dmlex.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -906,9 +906,6 @@
"$ref": "#/$defs/etymonUnit"
},
"minItems": 1
},
"translation": {
"type": "string"
}
},
"additionalProperties": false
Expand Down Expand Up @@ -950,6 +947,13 @@
"description": {
"type": "string",
"minLength": 1
},
"sameAs": {
"type": "array",
"items": {
"$ref": "#/$defs/sameAs"
},
"uniqueItems": true
}
},
"additionalProperties": false
Expand All @@ -963,6 +967,13 @@
},
"displayName": {
"type": "string"
},
"sameAs": {
"type": "array",
"items": {
"$ref": "#/$defs/sameAs"
},
"uniqueItems": true
}
},
"additionalProperties": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,11 +709,7 @@
"$ref": "#/$defs/etymonUnit"
},
"minItems": 1
},
"translation": {
"type": "string"
}
},
} },
"additionalProperties": false
},
"etymonUnit": {
Expand Down Expand Up @@ -753,6 +749,13 @@
"description": {
"type": "string",
"minLength": 1
},
"sameAs": {
"type": "array",
"items": {
"$ref": "#/$defs/sameAs"
},
"uniqueItems": true
}
},
"additionalProperties": false
Expand All @@ -766,6 +769,13 @@
},
"displayName": {
"type": "string"
},
"sameAs": {
"type": "array",
"items": {
"$ref": "#/$defs/sameAs"
},
"uniqueItems": true
}
},
"additionalProperties": false
Expand Down
7 changes: 4 additions & 3 deletions dmlex-v1.0/specification/schemas/RDF/dmlex-etymology.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ dmlex:Etymon a owl:Class ;
a owl:Restriction ;
owl:onProperty dmlex:etymonUnit ;
owl:minCardinality 1 ] , [
a owl:Restriction ;
owl:onProperty dmlex:translation ;
owl:maxCardinality 1 ] , [
a owl:Restriction ;
owl:onProperty dmlex:listingOrder ;
owl:cardinality 1 ] .
Expand Down Expand Up @@ -140,3 +137,7 @@ dmlex:displayName a owl:ObjectProperty ;
rdfs:label "Display Name"@en ;
rdfs:domain dmlex:EtymonLanguage ;
rdfs:range xsd:string .


dmlex:EtymonLanguage rdfs:subClassOf dmlex:HasSameAs .
dmlex:EtymonType rdfs:subClassOf dmlex:HasSameAs .
5 changes: 4 additions & 1 deletion dmlex-v1.0/specification/schemas/RDF/dmlex.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,6 @@ dmlex:translation a owl:DatatypeProperty ;
rdfs:domain dmlex:HasTranslation ;
rdfs:range xsd:string .

dmlex:Etymon rdfs:subClassOf dmlex:HasTranslation .
dmlex:EtymonUnit rdfs:subClassOf dmlex:HasTranslation .

dmlex:EtymonUnit a owl:Class ;
Expand Down Expand Up @@ -990,3 +989,7 @@ dmlex:displayName a owl:ObjectProperty ;
rdfs:label "Display Name"@en ;
rdfs:domain dmlex:EtymonLanguage ;
rdfs:range xsd:string .

dmlex:EtymonLanguage rdfs:subClassOf dmlex:HasSameAs .
dmlex:EtymonType rdfs:subClassOf dmlex:HasSameAs .

3 changes: 2 additions & 1 deletion dmlex-v1.0/specification/schemas/XML/dmlex.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,6 @@ It might be possible to re-write them as <assert>s using concatenation of values
<xs:sequence>
<xs:element name="note" minOccurs="0" type="xs:string"/>
<xs:element ref="etymonUnit" maxOccurs="unbounded"/>
<xs:element name="translation" minOccurs="0" type="xs:string"/>
</xs:sequence>
<xs:attribute name="when" use="optional" type="xs:string"/>
<xs:attribute name="type" use="optional" type="xs:string"/>
Expand All @@ -667,6 +666,7 @@ It might be possible to re-write them as <assert>s using concatenation of values
<xs:complexType name="etymonTypeType">
<xs:sequence>
<xs:element name="description" minOccurs="0" type="nonEmptyString"/>
<xs:element ref="sameAs" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="type" use="required" type="nonEmptyString"/>
</xs:complexType>
Expand All @@ -676,6 +676,7 @@ It might be possible to re-write them as <assert>s using concatenation of values
<xs:complexType name="etymonLanguageType">
<xs:sequence>
<xs:element name="displayName" minOccurs="0" type="xs:string"/>
<xs:element ref="sameAs" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="langCode" use="required" type="xs:language"/>
</xs:complexType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ It might be possible to re-write them as <assert>s using concatenation of values
<xs:sequence>
<xs:element name="note" minOccurs="0" type="xs:string"/>
<xs:element ref="etymonUnit" maxOccurs="unbounded"/>
<xs:element name="translation" minOccurs="0" type="xs:string"/>
</xs:sequence>
<xs:attribute name="when" use="optional" type="xs:string"/>
<xs:attribute name="type" use="optional" type="xs:string"/>
Expand All @@ -552,6 +551,7 @@ It might be possible to re-write them as <assert>s using concatenation of values
<xs:complexType name="etymonTypeType">
<xs:sequence>
<xs:element name="description" minOccurs="0" type="nonEmptyString"/>
<xs:element ref="sameAs" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="type" use="required" type="nonEmptyString"/>
</xs:complexType>
Expand All @@ -561,6 +561,7 @@ It might be possible to re-write them as <assert>s using concatenation of values
<xs:complexType name="etymonLanguageType">
<xs:sequence>
<xs:element name="displayName" minOccurs="0" type="xs:string"/>
<xs:element ref="sameAs" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="langCode" use="required" type="xs:language"/>
</xs:complexType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
<glossterm>required</glossterm>, array of one or more <literal><olink
targetptr="json_etymonUnit">etymonUnit</olink></literal> instances</para>
</listitem>
<listitem>
<para><literal>"translation"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
</itemizedlist>

</section>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
<para><literal>"displayName"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"sameAs"</literal>
<glossterm>optional</glossterm>, array of zero or more strings implementing the
<olink targetptr="values_sameAs">sameAs</olink> object type</para>
</listitem>
</itemizedlist>

</section>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
<para><literal>"description"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"sameAs"</literal>
<glossterm>optional</glossterm>, array of zero or more strings implementing the
<olink targetptr="values_sameAs">sameAs</olink> object type</para>
</listitem>
</itemizedlist>

</section>
3 changes: 0 additions & 3 deletions dmlex-v1.0/specification/serializations/NVH/nodes/etymon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
<listitem>
<para><literal><olink targetptr="nvh_etymonUnit">etymonUnit</olink></literal> <glossterm>required</glossterm> (one or more)</para>
</listitem>
<listitem>
<para><literal>translation</literal> <glossterm>optional</glossterm> (zero or one)</para>
</listitem>
</itemizedlist>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<listitem>
<para><literal>displayName</literal> <glossterm>optional</glossterm> (zero or one)</para>
</listitem>
<listitem>
<para><literal><olink targetptr="nvh_sameAs">sameAs</olink></literal> <glossterm>optional</glossterm> (zero or more)</para>
</listitem>
</itemizedlist>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<listitem>
<para><literal>description</literal> <glossterm>optional</glossterm> (zero or one)</para>
</listitem>
<listitem>
<para><literal><olink targetptr="nvh_sameAs">sameAs</olink></literal> <glossterm>optional</glossterm> (zero or more)</para>
</listitem>
</itemizedlist>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
<listitem>
<para><literal>note: nvarchar</literal></para>
</listitem>
<listitem>
<para><literal>translation: nvarchar</literal></para>
</listitem>
<listitem>
<para><literal>listingOrder: int</literal></para>
</listitem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
<listitem>
<para><literal>dmlex:etymonUnit</literal> REQUIRED (at least 1) reference to <olink targetptr="rdf_EtymonUnit">EtymonUnit</olink></para>
</listitem>
<listitem>
<para><literal>dmlex:translation</literal> OPTIONAL (at most 1) of type <literal>http://www.w3.org/2001/XMLSchema#string</literal></para>
</listitem>
</itemizedlist>


</section>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
<listitem>
<para><literal>dmlex:displayName</literal> OPTIONAL (at most 1) of type <literal>http://www.w3.org/2001/XMLSchema#string</literal></para>
</listitem>
<listitem>
<para><literal>dmlex:sameAs</literal> OPTIONAL</para>
</listitem>
</itemizedlist>


</section>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
<listitem>
<para><literal>dmlex:type</literal> REQUIRED (exactly 1) of type <literal>http://www.w3.org/2001/XMLSchema#string</literal></para>
</listitem>
<listitem>
<para><literal>dmlex:sameAs</literal> OPTIONAL</para>
</listitem>
</itemizedlist>


</section>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
<listitem>
<para><literal><olink targetptr="xml_etymonUnit">&lt;etymonUnit&gt;</olink></literal> <glossterm>required</glossterm> (one or more)</para>
</listitem>
<listitem>
<para><literal>&lt;translation&gt;</literal> <glossterm>optional</glossterm> (zero or one)</para>
</listitem>
</itemizedlist>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<listitem>
<para><literal>&lt;displayName&gt;</literal> <glossterm>optional</glossterm> (zero or one)</para>
</listitem>
<listitem>
<para><literal><olink targetptr="xml_sameAs">&lt;sameAs&gt;</olink></literal> <glossterm>optional</glossterm> (zero or more)</para>
</listitem>
</itemizedlist>


Expand Down
Loading

0 comments on commit 3932b13

Please sign in to comment.