Skip to content

Commit

Permalink
Merge pull request #143 from mjakubicek/master
Browse files Browse the repository at this point in the history
editorial fixes + some NVH examples
  • Loading branch information
mjakubicek authored Sep 5, 2024
2 parents 3932b13 + 4cbf948 commit 8bdea24
Show file tree
Hide file tree
Showing 53 changed files with 340 additions and 119 deletions.
2 changes: 1 addition & 1 deletion dmlex-v1.0/specification/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dmlex_uml.svg: dmlex.dot
dmlex.dot: dmlex.dot.m4 dmlex.dot.content
m4 $< > $@

dmlex.dot.content: schemas/informativeCopiesOf3rdPartySchemas/NVH/dmlex.nvh nvh2dot.py
dmlex.dot.content: schemas/informativeCopiesOf3rdPartySchemas/NVH/dmlex_model_description.nvh nvh2dot.py
awk '/<programlisting>/,/<\/programlisting>/' $< | tail -n+2 | head -n-1 | ./nvh2dot.py > $@

Makefile.dep: dmlex.xml $(SOURCE_XML) makedep.sh
Expand Down
13 changes: 13 additions & 0 deletions dmlex-v1.0/specification/core/objectTypes/entry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,17 @@
<graphic fileref="core/databaseDiagrams/entry.svg" contentwidth="16cm"/>
</example>

<example>
<title>NVH</title>
<programlisting>
entry: [headword]
homograph: ...
pos: ...
label: ...
pronunciation: ...
form: ...
sense: ...
</programlisting>
</example>

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

<example>
<title>NVH</title>
<programlisting>
form: [text]
tag: ...
label: ...
pronunciation: ...
</programlisting>
</example>

<itemizedlist>
<title>Comments</title>
<listitem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,15 @@
<graphic fileref="core/databaseDiagrams/lexicographicResource.svg" contentwidth="16cm"/>
</example>

<example>
<title>NVH</title>
<programlisting>
lexicographicResource: http://example.com/dictionary
title: An example dictionary
langCode: en
entry: ...
entry: ...
</programlisting>
</example>

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

<example>
<title>NVH</title>
<programlisting>
pos: [tag]
</programlisting>
</example>

</section>
3 changes: 1 addition & 2 deletions dmlex-v1.0/specification/core/objectTypes/pronunciation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
</listitem>
<listitem>
<para><literal><olink targetptr="core_transcription">transcription</olink></literal>
<glossterm>optional</glossterm> (zero or more) and <glossterm>unique</glossterm>.
Normalised string.</para>
<glossterm>optional</glossterm> (zero or more) and <glossterm>unique</glossterm>.</para>
</listitem>
</itemizedlist>
</listitem>
Expand Down
10 changes: 10 additions & 0 deletions dmlex-v1.0/specification/core/objectTypes/sense.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@
</programlisting>
</example>

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

<example>
<title>Relational database</title>
<graphic fileref="core/databaseDiagrams/sense.svg" contentwidth="16cm"/>
Expand Down
7 changes: 5 additions & 2 deletions dmlex-v1.0/specification/dmlex.xml
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@
<para>This description uses the <ulink url="https://www.namevaluehierarchy.org/schema.html">NVH schema notation style</ulink> and the convention that all object types and their properties are prefixed by either <literal>core@</literal> or <literal>MODULENAME@</literal> strings. Their arity is denoted by a <literal>*</literal> (zero or more), <literal>+</literal> (one or more), <literal>?</literal> (zero or one) or <literal>N+</literal> (<literal>N</literal> or more). If no arity is given, it indicates the arity of 1, i.e. being required and occurring exactly once.
</para>
<programlisting>
<xi:include href="schemas/informativeCopiesOf3rdPartySchemas/NVH/dmlex.nvh" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="schemas/informativeCopiesOf3rdPartySchemas/NVH/dmlex_model_description.nvh" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</programlisting>
</appendix>

Expand All @@ -978,7 +978,7 @@
<para>Filip, David - Masaryk University (previously TCD, ADAPT Centre) </para>
</listitem>
<listitem>
<para>Jakubíček, Miloš - Lexical Computing </para>
<para>Jakubíček, Miloš - Lexical Computing, Masaryk University </para>
</listitem>
<listitem>
<para>Kallas, Jelena - Institute of the Estonian Language</para>
Expand All @@ -995,6 +995,9 @@
<listitem>
<para>Krek, Simon - Jožef Stefan Institute </para>
</listitem>
<listitem>
<para>Kovář, Vojtěch - Lexical Computing, Masaryk University </para>
</listitem>
<listitem>
<para>McCrae, John - University of Galway </para>
</listitem>
Expand Down
13 changes: 13 additions & 0 deletions dmlex-v1.0/specification/examples/examples/build_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,16 @@
outf.write(line.replace("<", "&lt;").replace(">", "&gt;"))
outf.write("</programlisting>\n")

for f in glob("source/*.nvh"):
with open(f) as inf:
with open(f + ".xml", "w") as outf:
outf.write("<!-- This example is automatically generated. DO NOT EDIT -->\n")
outf.write("<programlisting>\n")
for line in inf.readlines():
while len(line) > N:
outf.write(line[:N].replace("<", "&lt;").replace(">", "&gt;"))
outf.write("\n")
line = line[N:]
outf.write(line.replace("<", "&lt;").replace(">", "&gt;"))
outf.write("</programlisting>\n")

13 changes: 13 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/0.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
lexicographicResource: http://example.com
langCode: en
entry: abandon
pos: verb
sense:
definition: to suddenly leave a place or a person
example: I'm sorry I abandoned you like that.
example: Abandon ship!
label: idiom
sense:
label: mostly-passive
definition: to stop supporting an idea
example: That theory has been abandoned.
7 changes: 7 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/1.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
entry: folúsghlantóir
pos: n-masc
form: folúsghlantóra
tag: sg-gen
form: folúsghlantóirí
tag: pl
sense: ...
6 changes: 6 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/10.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
lexicographicResource: http://example.com
title: My Irish-Multilingual Dictionary
langCode: ga
translationLanguage: en
translationLanguage: de
translationLanguage: cs
10 changes: 10 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/11.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
entry: fómhar
sense:
en_translation: autumn
en_translation: fall
de_translation: Herbst
cs_translation: podzim
sense:
en_translation: harvest
de_translation: Ernte
cs_translation: sklizeň
33 changes: 33 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/12.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
lexicographicResource: http://example.com
langCode: en
entry: glasses
sense:
definition: an optical seeing aid
entry: microscope
sense:
definition: equipment for looking at very small things
entry: lens
sense:
definition: curved glass that makes things seem bigger
relation: meronymy
member: example.com/entry/glasses~0~0/sense/0~an%20optical%20seeing%20aid
role: whole
member: example.com/entry/lens~0~0/sense/0~curved%20glass%20that%20makes%20things%20seem%20bigger
role: part
relation: meronymy
member: example.com/entry/microscope~0~0/sense/0~equipment%20for%20looking%20at%20very%20small%20things
role: whole
member: example.com/entry/lens~0~0/sense/0~curved%20glass%20that%20makes%20things%20seem%20bigger
role: part
relationType: meronomy
description: part-whole relationship
memberType: sense
role: whole
min: 1
max: 1
hint: navigate
memberType: sense
role: part
min: 1
max: 1
hint: navigate
16 changes: 16 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/13.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
lexicographicResource: http://example.com
langCode: en
entry: buy
sense:
definition: get something by paying money for it
entry: sell
sense:
definition: exchange something for money
relation: antonyms
member: example.com/entry/buy~0~0/sense/0~get%20something%20by%20paying%20money%20for%20it
member: example.com/entry/sell~0~0/sense/0~exchange%20something%20for%20money
relationType: antonyms
memberType: sense
min: 2
max: 2
hint: navigate
25 changes: 25 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/14.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
lexicographicResource: http://example.com
langCode: de
translationLanguage: en
entry: See
pos: n-fem
sense:
headwordTranslation: sea
entry: Meer
pos: n-neut
sense:
headwordTranslation: sea
entry: Ozean
pos: n-masc
sense
headwordTranslation: ocean
relation: synonyms
description: words that mean sea and ocean
member: example.com/entry/See~0~0/sense/0~0
member: example.com/entry/Meer~0~0/sense/0~0
member: example.com/entry/Ozean~0~0/sense/0~0
relationType: synonyms
description: synonyms and near synonyms
memberType: sense
min: 2
hint: navigate
4 changes: 4 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/2.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
entry: aardvark
pronunciation:
transcription: a:rdva:rk
sense: ...
3 changes: 3 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/3.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
entry: aardvark
pronunciation: aardvark.mp3
sense: ...
4 changes: 4 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/4.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
entry: aardvark
pronunciation: aardvark.mp3
transcription: a:rdva:rk
sense: ...
17 changes: 17 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/5.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
lexicographicResource: http://example.com
langCode: ga
entry: folúsghlantóir
pos: n-masc
form: folúsghlantóra
tag: sg-gen
form: folúsghlantóirí
tag: pl
sense: ...
posTag: n-masc
description: masculine noun
posTag: n-fem
description: feminine noun
formTag: sg-gen
description: singular genitive
formTag: pl
description: plural
8 changes: 8 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/6.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
posTag: n-masc
description: masculine noun
sameAs: http://www.lexinfo.net/ontology/3.0/lexinfo#noun
sameAs: uri: http://www.lexinfo.net/ontology/3.0/lexinfo#masculine
posTag: n-fem
description: feminine noun
sameAs: http://www.lexinfo.net/ontology/3.0/lexinfo#noun
sameAs: http://www.lexinfo.net/ontology/3.0/lexinfo#feminine
4 changes: 4 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/7.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
lexicographicResource: http://example.com
title: My German-English Dictionary
langCode: de
translationLanguage: en
11 changes: 11 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/8.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
entry: doctor
sense: medical doctor
translation: Arzt
pos: n-masc
translation: Ärztin
pos: n-fem
sense: academic title
translation: Doktor
pos: n-masc
translation: Doktorin
pos: n-fem
5 changes: 5 additions & 0 deletions dmlex-v1.0/specification/examples/examples/source/9.nvh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
entry: Treppenwitz
pos: n-masc
sense:
explanation: belated realisation of what one could have said
translation: staircase wit
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<glossterm>optional</glossterm> (zero or one). Normalised string. A statement about
constraints and recommendation on using this tag. This can be a human-readable description
such as "for use with German nouns only" or a machine-readable instruction in any format
understandable to the DMLex implemenation, such as <code>partOfSpeech=noun AND
understandable to the DMLex implementation, such as <code>partOfSpeech=noun AND
language=de</code>.</para>
</listitem>
<listitem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<glossterm>optional</glossterm> (zero or one). Normalised string. A statement about
constraints and recommendation on using this tag. This can be a human-readable description
such as "for use with German nouns only" or a machine-readable instruction in any format
understandable to the DMLex implemenation, such as <code>partOfSpeech=noun AND
understandable to the DMLex implementation, such as <code>partOfSpeech=noun AND
language=de</code>.</para>
</listitem>
<listitem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<glossterm>optional</glossterm> (zero or one). Normalised string. A statement about
constraints and recommendation on using this tag. This can be a human-readable description
such as "for use in German and Czech only" or a machine-readable instruction in any format
understandable to the DMLex implemenation, such as <code>language=de OR
understandable to the DMLex implementation, such as <code>language=de OR
language=cs</code>.</para>
</listitem>
<listitem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<glossterm>optional</glossterm> (zero or one). Normalised string. A statement about
constraints and recommendation on using this tag. This can be a human-readable description
such as "for use in German and Czech only" or a machine-readable instruction in any format
understandable to the DMLex implemenation, such as <code>language=de OR
understandable to the DMLex implementation, such as <code>language=de OR
language=cs</code>.</para>
</listitem>
</itemizedlist>
Expand Down
Loading

0 comments on commit 8bdea24

Please sign in to comment.