Skip to content

Commit

Permalink
Merge pull request #115 from michmech/master
Browse files Browse the repository at this point in the history
strings and whitespace
  • Loading branch information
michmech authored Apr 18, 2024
2 parents 772b5f2 + b1c29af commit 1bf8137
Show file tree
Hide file tree
Showing 50 changed files with 338 additions and 219 deletions.
22 changes: 12 additions & 10 deletions dmlex-v1.0/specification/core/objectTypes/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
<title>Properties</title>
<listitem>
<para><literal>text</literal>
<glossterm>required</glossterm> (exactly one) and <glossterm>UNIQUE</glossterm>. Non-empty string. A statement, in the same
language as the headword, that describes and/or explains the meaning of a sense. In DMLex,
the term definition encompasses not only formal definitions, but also less formal
explanations.</para>
<glossterm>required</glossterm> (exactly one) and <glossterm>UNIQUE</glossterm>. Normalised
string. A statement, in the same language as the headword, that describes and/or explains
the meaning of a sense. In DMLex, the term definition encompasses not only formal
definitions, but also less formal explanations.</para>
</listitem>
<listitem>
<para><literal>definitionType</literal>
<glossterm>optional</glossterm> (zero or one). If a sense contains multiple definitions,
indicates the difference between them, for example that they are intended for different
audiences. The <code><olink targetptr="values_definitionTypeTag">definitionTypeTag</olink></code> object type can be used
to constrain and/or explain the definition types that occur in the lexicographic
resource.</para>
<glossterm>optional</glossterm> (zero or one). Normalised string. If a sense contains
multiple definitions, indicates the difference between them, for example that they are
intended for different audiences. The <code><olink targetptr="values_definitionTypeTag"
>definitionTypeTag</olink></code> object type can be used to constrain and/or explain
the definition types that occur in the lexicographic resource.</para>
</listitem>
<listitem>
<para><literal>listingOrder</literal>
Expand All @@ -47,7 +47,9 @@
<example>
<title>XML</title>
<programlisting>
&lt;definition definitionType="..."&gt;...&lt;/definition&gt;
&lt;definition definitionType="..."&gt;
&lt;text>...&lt;/text>
&lt;/definition&gt;
</programlisting>
</example>

Expand Down
7 changes: 5 additions & 2 deletions dmlex-v1.0/specification/core/objectTypes/entry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@
<title>Properties</title>
<listitem>
<para><literal>headword</literal>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm> (in combination with other unique properties if present). Non-empty string. The entry's
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm> (in
combination with other unique properties if present). Normalised string. The entry's
headword.</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). The entry's homograph number, as a guide to distinguish entries with the same headword.</para>
<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>
Expand Down
23 changes: 13 additions & 10 deletions dmlex-v1.0/specification/core/objectTypes/example.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,22 @@
<title>Properties</title>
<listitem>
<para><literal>text</literal>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm>. Non-empty string. The example itself.</para>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm>. Normalised
string. The example itself.</para>
</listitem>
<listitem>
<para><literal>sourceIdentity</literal>
<glossterm>optional</glossterm> (zero or one). An abbreviation, a code or some other string
of text which identifies the source. The <code><olink targetptr="values_sourceIdentityTag"
>sourceIdentityTag</olink></code> object type can be used to explain the meaning of the source
identifiers, to constrain which source identifiers are allowed to occur in the lexicographic
resource, and to map them onto external inventories and ontologies.</para>
<glossterm>optional</glossterm> (zero or one). Normalised string. An abbreviation, a code or
some other string of text which identifies the source. The <code><olink
targetptr="values_sourceIdentityTag">sourceIdentityTag</olink></code> object type can be
used to explain the meaning of the source identifiers, to constrain which source identifiers
are allowed to occur in the lexicographic resource, and to map them onto external
inventories and ontologies.</para>
</listitem>
<listitem>
<para><literal>sourceElaboration</literal>
<glossterm>optional</glossterm> (zero or one). Non-empty string. A free-form statement about
the source of the example. If <code>sourceIdentity</code> is present, then
<glossterm>optional</glossterm> (zero or one). Normalised string. A free-form statement
about the source of the example. If <code>sourceIdentity</code> is present, then
<code>sourceElaboration</code> can be used for information about where in the source the
example can be found: page number, chapter and so on. If <code>sourceIdentity</code> is
absent then <code>sourceElaboration</code> can be used to fully name the source.</para>
Expand All @@ -49,8 +51,9 @@
</listitem>
<listitem>
<para><literal>soundFile</literal>
<glossterm>optional</glossterm> (zero or one). A pointer to a file, such as a filename or a URI, containing a sound recording of the
example.</para>
<glossterm>optional</glossterm> (zero or one). An <emphasis>Internationalized Resource
Identifier</emphasis> (<link linkend="bib_rfc3987">IRI</link>) pointing to a file which
contains a sound recording of the example.</para>
</listitem>
<listitem>
<para><literal>listingOrder</literal>
Expand Down
20 changes: 11 additions & 9 deletions dmlex-v1.0/specification/core/objectTypes/inflectedForm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@
<title>Properties</title>
<listitem>
<para><literal>text</literal>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm> (in combination with other unique properties if present). Non-empty string. The text of the inflected
form.</para>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm> (in
combination with other unique properties if present). Normalised string. The text of the
inflected form.</para>
</listitem>
<listitem>
<para><literal>tag</literal>
<glossterm>optional</glossterm> (zero or one) and <glossterm>unique</glossterm> (in combination with other unique properties if present). Non-empty string. An abbreviation, a code or
some other string of text which identifies the inflected form, for example <code>pl</code>
for plural, <code>gs</code> for genitive singular, <code>com</code> for comparative. The
<code><olink targetptr="values_inflectedFormTag">inflectedFormTag</olink></code> object
type can be used to explain the meaning of the inflection tags, to constrain which
inflection tags are allowed to occur in the lexicographic resource, and to map them onto
external inventories and ontologies.</para>
<glossterm>optional</glossterm> (zero or one) and <glossterm>unique</glossterm> (in
combination with other unique properties if present). Normalised string. An abbreviation, a
code or some other string of text which identifies the inflected form, for example
<code>pl</code> for plural, <code>gs</code> for genitive singular, <code>com</code> for
comparative. The <code><olink targetptr="values_inflectedFormTag"
>inflectedFormTag</olink></code> object type can be used to explain the meaning of the
inflection tags, to constrain which inflection tags are allowed to occur in the
lexicographic resource, and to map them onto external inventories and ontologies.</para>
</listitem>
<listitem>
<para><literal><olink targetptr="core_label">label</olink></literal>
Expand Down
13 changes: 7 additions & 6 deletions dmlex-v1.0/specification/core/objectTypes/label.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@
<title>Properties</title>
<listitem>
<para><literal>tag</literal>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm>. Non-empty string. An abbreviation, a code or
some other string of text which identifies the label, for example <code>neo</code> for
neologism, <code>colloq</code> for colloquial, <code>polit</code> for politics. The
<code><olink targetptr="values_labelTag">labelTag</olink></code> object type can be used to explain
the meaning of the labels, to constrain which labels are allowed to occur in the
lexicographic resource, and to map them onto external inventories and ontologies.</para>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm>. Normalised
string. An abbreviation, a code or some other string of text which identifies the label, for
example <code>neo</code> for neologism, <code>colloq</code> for colloquial,
<code>polit</code> for politics. The <code><olink targetptr="values_labelTag"
>labelTag</olink></code> object type can be used to explain the meaning of the labels,
to constrain which labels are allowed to occur in the lexicographic resource, and to map
them onto external inventories and ontologies.</para>
</listitem>
<listitem>
<para><literal>listingOrder</literal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<title>Properties</title>
<listitem>
<para><literal>title</literal>
<glossterm>optional</glossterm> (zero or one). Non-empty string. A human-readable title of
<glossterm>optional</glossterm> (zero or one). Normalised string. A human-readable title of
the lexicographic resource.</para>
</listitem>
<listitem>
Expand Down
14 changes: 7 additions & 7 deletions dmlex-v1.0/specification/core/objectTypes/partOfSpeech.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
<title>Properties</title>
<listitem>
<para><literal>tag</literal>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm>. Non-empty string. An abbreviation, a code or
some other string of text which identifies the part-of-speech label, for example
<code>n</code> for noun, <code>v</code> for verb, <code>adj</code> for adjective. The
<code><olink targetptr="values_partOfSpeechTag">partOfSpeechTag</olink></code> object type can be used to explain
the meaning of the part-of-speech tags, to constrain which part-of-speech tags are allowed
to occur in the lexicographic resource, and to map them onto external inventories and
ontologies.</para>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm>. Normalised
string. An abbreviation, a code or some other string of text which identifies the
part-of-speech label, for example <code>n</code> for noun, <code>v</code> for verb,
<code>adj</code> for adjective. The <code><olink targetptr="values_partOfSpeechTag"
>partOfSpeechTag</olink></code> object type can be used to explain the meaning of the
part-of-speech tags, to constrain which part-of-speech tags are allowed to occur in the
lexicographic resource, and to map them onto external inventories and ontologies.</para>
</listitem>
<listitem>
<para><literal>listingOrder</literal>
Expand Down
3 changes: 2 additions & 1 deletion dmlex-v1.0/specification/core/objectTypes/pronunciation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
</listitem>
<listitem>
<para><literal><olink targetptr="core_transcription">transcription</olink></literal>
<glossterm>optional</glossterm> (zero or more) and <glossterm>unique</glossterm>.</para>
<glossterm>optional</glossterm> (zero or more) and <glossterm>unique</glossterm>.
Normalised string.</para>
</listitem>
</itemizedlist>
</listitem>
Expand Down
9 changes: 5 additions & 4 deletions dmlex-v1.0/specification/core/objectTypes/sense.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
</listitem>
<listitem>
<para><literal>indicator</literal>
<glossterm>optional</glossterm> (zero or one) and <glossterm>unique</glossterm>. A short statement, in the same language as
the headword, that gives an indication of the meaning of a sense and permits its
differentiation from other senses in the entry. Indicators are sometimes used in
dictionaries instead of or in addition to definitions.</para>
<glossterm>optional</glossterm> (zero or one) and <glossterm>unique</glossterm>. Normalised
string. A short statement, in the same language as the headword, that gives an indication of
the meaning of a sense and permits its differentiation from other senses in the entry.
Indicators are sometimes used in dictionaries instead of or in addition to
definitions.</para>
</listitem>
<listitem>
<para><literal><olink targetptr="core_label">label</olink></literal>
Expand Down
8 changes: 5 additions & 3 deletions dmlex-v1.0/specification/core/objectTypes/transcription.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<title>Properties</title>
<listitem>
<para><literal>text</literal>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm>. Non-empty string. The actual
transcription.</para>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm>. Normalised
string. The actual transcription.</para>
</listitem>
<listitem>
<para><literal>scheme</literal>
Expand All @@ -47,7 +47,9 @@
<example>
<title>XML</title>
<programlisting>
&lt;transcription scheme="..."&gt;...&lt;/transcription&gt;
&lt;transcription scheme="..."&gt;
&lt;text>...&lt;/text>
&lt;/transcription&gt;
</programlisting>
</example>

Expand Down
36 changes: 28 additions & 8 deletions dmlex-v1.0/specification/dmlex.xml
Original file line number Diff line number Diff line change
Expand Up @@ -345,21 +345,41 @@
including all the modules. An object type defined in one module is guaranteed not to
name-conflict with another object type in another module.</para>
</section>
<section>
<section id="modelProperties">
<title>Properties</title>
<para>For every object type, DMLex defines which properties it can have, whether the properties
are required or optional, what their arities are (for example “zero or more”), and what
kinds of values it can contains.</para>
<para>There are two kinds of properties: those that contain literal values and those that
contain objects.</para>
<para>Some properties are defined to contain literal values such as strings and numbers. The
following types of literal values are used in DMLex: <simplelist>
<member>non-empty string,</member>
<member>number,</member>
<member>unique identifier</member>
<member>and reference to a unique identifier</member>
</simplelist>
</para>
following types of literal values are used in DMLex:</para>
<itemizedlist>
<listitem>
<para>normalised string: a string that contains no new lines, does not start or end with a whitespace, contains no block of ASCII whitespace more than a single space and is non-empty.</para>
</listitem>
<listitem>
<para>number: including negative numbers and floating-point numbers</para>
</listitem>
<listitem>
<para>non-negative integer number</para>
</listitem>
<listitem>
<para>boolean: a true/false value</para>
</listitem>
<listitem>
<para>URI</para>
</listitem>
<listitem>
<para>IETF language code</para>
</listitem>
<listitem>
<para><link linkend="bib_rfc3987">IRI</link>: an Internationalized Resource Identifier</para>
</listitem>
<listitem>
<para>closed list of possible values</para>
</listitem>
</itemizedlist>
<para>Some properties are defined to contain objects (of types defined in DMLex), for
example an object of type <code>entry</code> can contain objects of type
<code>sense</code>. In such cases, the name of the property is the same as the name of
Expand Down
9 changes: 6 additions & 3 deletions dmlex-v1.0/specification/examples/examples/source/0.xml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
&lt;headword&gt;abandon&lt;/headword&gt;
&lt;partOfSpeech tag="verb"/&gt;
&lt;sense id="abandon-verb-1"&gt;
&lt;definition&gt;to suddenly leave a place or a person&lt;/definition&gt;

&lt;definition&gt;
&lt;text>to suddenly leave a place or a person&lt;/text>
&lt;/definition&gt;
&lt;example&gt;
&lt;text&gt;I'm sorry I abandoned you like that.&lt;/text&gt;
&lt;/example&gt;
Expand All @@ -16,7 +17,9 @@
&lt;/sense&gt;
&lt;sense id="abandon-verb-2"&gt;
&lt;label tag="mostly-passive"/&gt;
&lt;definition&gt;to stop supporting an idea&lt;/definition&gt;
&lt;definition&gt;
&lt;text>to stop supporting an idea&lt;/text>
&lt;/definition&gt;
&lt;example&gt;
&lt;text&gt;That theory has been abandoned.&lt;/text&gt;
&lt;/example&gt;
Expand Down
8 changes: 5 additions & 3 deletions dmlex-v1.0/specification/examples/examples/source/12.xml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@
&lt;entry id="glasses"&gt;
&lt;headword&gt;glasses&lt;/headword&gt;
&lt;sense id="glasses-1"&gt;
&lt;definition&gt;an optical seeing aid&lt;/definition&gt;
&lt;definition&gt;
&lt;text>an optical seeing aid&lt;/text>
&lt;/definition&gt;
&lt;/sense&gt;
&lt;/entry&gt;
&lt;entry id="microscope"&gt;
&lt;headword&gt;microscope&lt;/headword&gt;
&lt;sense id="microscope-1"&gt;
&lt;definition&gt;
equipment for looking at very small things
&lt;text>equipment for looking at very small things&lt;/text>
&lt;/definition&gt;
&lt;/sense&gt;
&lt;/entry&gt;
&lt;entry id="lens"&gt;
&lt;headword&gt;lens&lt;/headword&gt;
&lt;sense id="lens-1"&gt;
&lt;definition&gt;
curved glass that makes things seem bigger
&lt;text>curved glass that makes things seem bigger&lt;/text>
&lt;/definition&gt;
&lt;/sense&gt;
&lt;/entry&gt;
Expand Down
8 changes: 6 additions & 2 deletions dmlex-v1.0/specification/examples/examples/source/13.xml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
&lt;entry id="buy"&gt;
&lt;headword&gt;buy&lt;/headword&gt;
&lt;sense id="buy-1"&gt;
&lt;definition&gt;get something by paying money for it&lt;/definition&gt;
&lt;definition&gt;
&lt;text>get something by paying money for it&lt;/text>
&lt;/definition&gt;
&lt;/sense&gt;
&lt;/entry&gt;
&lt;entry id="sell"&gt;
&lt;headword&gt;sell&lt;/headword&gt;
&lt;sense id="sell-1"&gt;
&lt;definition&gt;exchange something for money&lt;/definition&gt;
&lt;definition&gt;
&lt;text>exchange something for money&lt;/text>
&lt;/definition&gt;
&lt;/sense&gt;
&lt;/entry&gt;
&lt;relation type="antonyms"&gt;
Expand Down
9 changes: 6 additions & 3 deletions dmlex-v1.0/specification/examples/examples/source/15.xml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
&lt;partOfSpeech tag="n"/&gt;
&lt;label tag="europeanSpelling"/&gt;
&lt;sense id="colour-1"&gt;
&lt;definition&gt;red, blue, yellow etc.&lt;/definition&gt;
&lt;example&gt;&lt;text&gt;What is your favourite colour?&lt;/text&gt;&lt;/example&gt;

&lt;definition&gt;
&lt;text>red, blue, yellow etc.&lt;/text>
&lt;/definition&gt;
&lt;example&gt;
&lt;text&gt;What is your favourite colour?&lt;/text&gt;
&lt;/example&gt;
&lt;/sense&gt;
&lt;/entry&gt;
&lt;entry id="color"&gt;
Expand Down
Loading

0 comments on commit 1bf8137

Please sign in to comment.