Skip to content

Commit

Permalink
Merge pull request #149 from mjakubicek/master
Browse files Browse the repository at this point in the history
many small editorial changes + completed NVH examples
  • Loading branch information
mjakubicek authored Sep 5, 2024
2 parents 37c611d + 1f75a32 commit bb66139
Show file tree
Hide file tree
Showing 130 changed files with 1,143 additions and 221 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
prerelease: true
title: "Latest Version"
files: |
dmlex-v1.0/specification/dmlex-v1.0-csd03.html
dmlex-v1.0/specification/dmlex-v1.0-csd03.pdf
dmlex-v1.0/specification/dmlex-v1.0-csd03.xml
dmlex-v1.0/specification/dmlex-v1.0-csd04.html
dmlex-v1.0/specification/dmlex-v1.0-csd04.pdf
dmlex-v1.0/specification/dmlex-v1.0-csd04.xml
dmlex-v1.0/specification/dmlex_uml.svg
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ Please see the [LICENSE file](https://github.com/oasis-tcs/lexidma/blob/master/L

Current working draft versions in this repository:

* [WD01 HTML](../../releases/download/dev-latest/dmlex-v1.0-wd01.html)
* [WD01 PDF](../../releases/download/dev-latest/dmlex-v1.0-wd01.pdf)
* CSD04 [[HTML](../../releases/download/csd04/dmlex-v1.0-csd04.html), [PDF](../../releases/download/csd04/dmlex-v1.0-csd04.pdf)]

* CSD03 [[HTML](../../releases/download/csd03/dmlex-v1.0-csd03.html), [PDF](../../releases/download/csd03/dmlex-v1.0-csd03.pdf)]

* CSD02 [[HTML](../../releases/download/csd02/dmlex-v1.0-csd02.html), [PDF](../../releases/download/csd02/dmlex-v1.0-csd02.pdf)]

* CSD01 [[HTML](../../releases/download/csd01/dmlex-v1.0-csd01.html), [PDF](../../releases/download/csd01/dmlex-v1.0-csd01.pdf)]

* WD01 [[HTML](../../releases/download/dev-latest/dmlex-v1.0-wd01.html), [PDF](../../releases/download/dev-latest/dmlex-v1.0-wd01.pdf)]

## Contact

Expand Down
7 changes: 7 additions & 0 deletions dmlex-v1.0/specification/HOWTO
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
When making a change to a model, you may need to update:
- the actual text in the specification
- the plain-text model description in schemas/informativeCopiesOf3rdPartySchemas/NVH/dmlex_model_description.nvh
which is also used to generate the UML diagram
- all serializations
- examples of serializations that are next to the specification text
- examples of serializations that are in the examples/ subdirectory
8 changes: 8 additions & 0 deletions dmlex-v1.0/specification/core/objectTypes/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,13 @@
<title>Relational database</title>
<graphic fileref="core/databaseDiagrams/definition.svg" contentwidth="16cm"/>
</example>

<example>
<title>NVH</title>
<programlisting>
definition: text
definitionType: ...
</programlisting>
</example>

</section>
10 changes: 5 additions & 5 deletions dmlex-v1.0/specification/core/objectTypes/entry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
combination with other unique properties if present). Normalised string. The entry's
headword.</para>
</listitem>
<listitem>
<para><literal><olink targetptr="core_partOfSpeech">partOfSpeech</olink></literal>
<glossterm>optional</glossterm> (zero or more) and <glossterm>unique</glossterm> (in combination with other unique properties if present). </para>
</listitem>
<listitem>
<para><literal>homographNumber</literal>
<glossterm>optional</glossterm> (zero or one) and <glossterm>unique</glossterm> (in
combination with other unique properties if present). Number. The entry's homograph number,
as a guide to distinguish entries with the same headword.</para>
</listitem>
<listitem>
<para><literal><olink targetptr="core_partOfSpeech">partOfSpeech</olink></literal>
<glossterm>optional</glossterm> (zero or more) and <glossterm>unique</glossterm> (in combination with other unique properties if present). </para>
</listitem>
<listitem>
<para><literal><olink targetptr="core_label">label</olink></literal>
<glossterm>optional</glossterm> (zero or more).</para>
Expand Down Expand Up @@ -160,7 +160,7 @@
<example>
<title>NVH</title>
<programlisting>
entry: [headword]
entry: headword
homograph: ...
pos: ...
label: ...
Expand Down
11 changes: 11 additions & 0 deletions dmlex-v1.0/specification/core/objectTypes/example.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,15 @@
<graphic fileref="core/databaseDiagrams/example.svg" contentwidth="16cm"/>
</example>

<example>
<title>NVH</title>
<programlisting>
example: text
sourceIdentity: ...
sourceElaboration: ...
soundFile: ...
label: ...
</programlisting>
</example>

</section>
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<example>
<title>NVH</title>
<programlisting>
form: [text]
form: text
tag: ...
label: ...
pronunciation: ...
Expand Down
9 changes: 8 additions & 1 deletion dmlex-v1.0/specification/core/objectTypes/label.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,12 @@
<title>Relational database</title>
<graphic fileref="core/databaseDiagrams/label.svg" contentwidth="16cm"/>
</example>


<example>
<title>NVH</title>
<programlisting>
label: tag
</programlisting>
</example>

</section>
2 changes: 1 addition & 1 deletion dmlex-v1.0/specification/core/objectTypes/partOfSpeech.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<example>
<title>NVH</title>
<programlisting>
pos: [tag]
pos: tag
</programlisting>
</example>

Expand Down
10 changes: 9 additions & 1 deletion dmlex-v1.0/specification/core/objectTypes/pronunciation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,12 @@
<graphic fileref="core/databaseDiagrams/pronunciation.svg" contentwidth="16cm"/>
</example>

</section>
<example>
<title>NVH</title>
<programlisting>
pronunciation: soundFile
transcription: ...
label: ...
</programlisting>
</example>
</section>
12 changes: 6 additions & 6 deletions dmlex-v1.0/specification/core/objectTypes/sense.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,19 @@
</programlisting>
</example>

<example>
<title>Relational database</title>
<graphic fileref="core/databaseDiagrams/sense.svg" contentwidth="16cm"/>
</example>

<example>
<title>NVH</title>
<programlisting>
sense: [indicator]
sense: indicator
definition: ...
label: ...
example: ...
</programlisting>
</example>

<example>
<title>Relational database</title>
<graphic fileref="core/databaseDiagrams/sense.svg" contentwidth="16cm"/>
</example>

</section>
8 changes: 8 additions & 0 deletions dmlex-v1.0/specification/core/objectTypes/transcription.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,12 @@
<graphic fileref="core/databaseDiagrams/transcription.svg" contentwidth="16cm"/>
</example>

<example>
<title>NVH</title>
<programlisting>
transcription: text
scheme: ...
</programlisting>
</example>

</section>
32 changes: 16 additions & 16 deletions dmlex-v1.0/specification/core/specification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,19 @@
<para>For the purpose of creating DMLex fragment identification strings, each object is assigned a unique ID relative to its parent, based on values of its properties declared as <glossterm>unique</glossterm>. Multiple situations can occur:</para>

<orderedlist>
<listitem>The object type has a single <glossterm>unique</glossterm> property with an arity of “exactly one”, and the value of the property is a string or a number. In this case, the object ID is the string or the number, with the following modifications performed in that particular order:
<listitem><para>The object type has a single <glossterm>unique</glossterm> property with an arity of “exactly one”, and the value of the property is a string or a number. In this case, the object ID is the string or the number, with the following modifications performed in that particular order:
<itemizedlist>
<listitem>every “\” (ASCII character 5C) is replaced by “\\”</listitem>
<listitem>every “~” (ASCII character 7E) is replaced by “\~”</listitem>
<listitem>every “_” (ASCII character 5F) is replaced by “\_”</listitem>
<listitem>every “0” (zero, ASCII character 30) is replaced by “\0”</listitem>
<listitem>all IRI-unsafe characters (outside the <literal>iunreserved</literal> class according to [<link linkend="bib_rfc3987">RFC 3987</link>]) are percent-encoded according to [<link linkend="bib_rfc3986">RFC 3986</link>]</listitem>
</itemizedlist>
<listitem><para>every “\” (ASCII character 5C) is replaced by “\\”</para></listitem>
<listitem><para>every “~” (ASCII character 7E) is replaced by “\~”</para></listitem>
<listitem><para>every “_” (ASCII character 5F) is replaced by “\_”</para></listitem>
<listitem><para>every “0” (zero, ASCII character 30) is replaced by “\0”</para></listitem>
<listitem><para>all IRI-unsafe characters (outside the <literal>iunreserved</literal> class according to [<link linkend="bib_rfc3987">RFC 3987</link>]) are percent-encoded according to [<link linkend="bib_rfc3986">RFC 3986</link>]</para></listitem>
</itemizedlist></para>
</listitem>
<listitem>The object type has a single <glossterm>unique</glossterm> property with an arity of “exactly one”, and the value of the property is a child DMLex object. In this case, the object ID is the same as the object ID of the child object. (Note: this case actually does not occur in the specification as such; we list it here to streamline the description of the following cases.)</listitem>
<listitem>The object type has a single <glossterm>unique</glossterm> property with an arbitrary arity. In this case, all the partial single values or child object IDs are constructed according to the steps 1. and 2., and the resulting object ID is their concatenation using “_” (ASCII character 5F) as a separator. The order of the partial values is driven by the <literal>listingOrder</literal> of the respective objects. If this procedure returns an empty string (which can happen in case of <glossterm>unique</glossterm> attributes that allow the arity of zero), the string “0” (zero, ASCII character 30) is used instead of the empty string.</listitem>
<listitem>The object type has multiple <glossterm>unique</glossterm> properties. In this case, all the partial values or child object IDs are constructed according to the steps 1., 2. and 3., and the resulting object ID is their concatenation using “~” (ASCII character 5F) as a separator. The order of the partial values is driven by the order of the properties as given in this specification. (Note: all atributes marked as <glossterm>unique</glossterm> need to be represented in the ID, as empty values are replaced by “0” according to step 3. No empty IDs are allowed.)</listitem>
<listitem>In specific situations it may happen there are multiple different objects with all the <glossterm>unique</glossterm> properties empty, i.e. multiple objects with duplicate IDs (the same sequence of zeros) emerge as the result of the step 4. One example of such a situation is multiple senses without <literal>indicator</literal>s or <literal>definition</literal>s, but with different translations. In that case, and only in that case, the value of <literal>listingOrder</literal> is concatenated to the sequence of zeros, to distinguish between the duplicate IDs. If there is only one such object, <literal>listingOrder</literal> is not concatenated to the sequence of zeros.</listitem>
<listitem><para>The object type has a single <glossterm>unique</glossterm> property with an arity of “exactly one”, and the value of the property is a child DMLex object. In this case, the object ID is the same as the object ID of the child object. (Note: this case actually does not occur in the specification as such; we list it here to streamline the description of the following cases.)</para></listitem>
<listitem><para>The object type has a single <glossterm>unique</glossterm> property with an arbitrary arity. In this case, all the partial single values or child object IDs are constructed according to the steps 1. and 2., and the resulting object ID is their concatenation using “_” (ASCII character 5F) as a separator. The order of the partial values is driven by the <literal>listingOrder</literal> of the respective objects. If this procedure returns an empty string (which can happen in case of <glossterm>unique</glossterm> attributes that allow the arity of zero), the string “0” (zero, ASCII character 30) is used instead of the empty string.</para></listitem>
<listitem><para>The object type has multiple <glossterm>unique</glossterm> properties. In this case, all the partial values or child object IDs are constructed according to the steps 1., 2. and 3., and the resulting object ID is their concatenation using “~” (ASCII character 5F) as a separator. The order of the partial values is driven by the order of the properties as given in this specification. (Note: all atributes marked as <glossterm>unique</glossterm> need to be represented in the ID, as empty values are replaced by “0” according to step 3. No empty IDs are allowed.)</para></listitem>
<listitem><para>In specific situations it may happen there are multiple different objects with all the <glossterm>unique</glossterm> properties empty, i.e. multiple objects with duplicate IDs (the same sequence of zeros) emerge as the result of the step 4. One example of such a situation is multiple senses without <literal>indicator</literal>s or <literal>definition</literal>s, but with different translations. In that case, and only in that case, the value of <literal>listingOrder</literal> is concatenated to the sequence of zeros, to distinguish between the duplicate IDs. If there is only one such object, <literal>listingOrder</literal> is not concatenated to the sequence of zeros.</para></listitem>
</orderedlist>

<para>DMLex does not define the structure of DMLex fragment identification strings for object types without <glossterm>unique</glossterm> properties.</para>
Expand All @@ -113,11 +113,11 @@
<title>DMLex fragment identification string examples</title>
<para>Particular examples of DMLex fragment identification strings can then look as follows:</para>
<itemizedlist>
<listitem><literal>www.example.com/lexicon/entry/cat~1~noun</literal></listitem>
<listitem><literal>www.example.com/lexicon/entry/cat~1~noun/sense/0~small%20furry%20animal</literal> (Here we assume that the sense's <literal>indicator</literal> is empty and it has one <literal>definition</literal> which says “small furry animal”).</listitem>
<listitem><literal>www.example.com/lexicon/entry/cat~1~noun/sense/0~small%20furry%20animal/example/I%20have%20two%20dogs%20and%20a%20cat.</literal></listitem>
<listitem><literal>www.example.com/lexicon/entry/cat~1~noun/sense/0~0</literal> (Here we assume that both the sense's <literal>definition</literal> and its <literal>indicator</literal> are empty, and there is only one such sense.)</listitem>
<listitem><literal>www.example.com/lexicon/entry/cat~1~noun/sense/0~02</literal> (Here we assume that both the sense's <literal>definition</literal> and its <literal>indicator</literal> are empty, there are multiple such senses, and this is the sense number 2, of all this entry's senses.)</listitem>
<listitem><para><literal>www.example.com/lexicon/entry/cat~noun~1</literal></para></listitem>
<listitem><para><literal>www.example.com/lexicon/entry/cat~noun~1/sense/0~small%20furry%20animal</literal> (Here we assume that the sense's <literal>indicator</literal> is empty and it has one <literal>definition</literal> which says “small furry animal”).</para></listitem>
<listitem><para><literal>www.example.com/lexicon/entry/cat~noun~1/sense/0~small%20furry%20animal/example/I%20have%20two%20dogs%20and%20a%20cat.</literal></para></listitem>
<listitem><para><literal>www.example.com/lexicon/entry/cat~noun~1/sense/0~0</literal> (Here we assume that both the sense's <literal>definition</literal> and its <literal>indicator</literal> are empty, and there is only one such sense.)</para></listitem>
<listitem><para><literal>www.example.com/lexicon/entry/cat~noun~1/sense/0~02</literal> (Here we assume that both the sense's <literal>definition</literal> and its <literal>indicator</literal> are empty, there are multiple such senses, and this is the sense number 2, of all this entry's senses.)</para></listitem>
</itemizedlist>
</section>
</section>
Expand Down
Loading

0 comments on commit bb66139

Please sign in to comment.