Skip to content

Commit

Permalink
Add examples based on work with the converter
Browse files Browse the repository at this point in the history
  • Loading branch information
jmccrae committed Jan 1, 2024
1 parent a4aea7c commit bc18c0b
Show file tree
Hide file tree
Showing 102 changed files with 2,339 additions and 1,226 deletions.
1 change: 1 addition & 0 deletions dmlex-v1.0/specification/examples/examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@
<xi:include href="examples/21.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="examples/22.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="examples/23.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="examples/24.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</section>
80 changes: 3 additions & 77 deletions dmlex-v1.0/specification/examples/examples/00.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,88 +33,14 @@
</example>
<example>
<title>XML</title>
<programlisting>
&lt;lexicographicResource uri="http://example.com" langCode="en"&gt;
&lt;entry id="abandon-verb"&gt;
&lt;headword&gt;abandon&lt;/headword&gt;
&lt;partOfSpeech value="verb"/&gt;
&lt;sense id="abandon-verb-1"&gt;
&lt;definition&gt;to suddenly leave a place or a person&lt;/definition&gt;
&lt;example&gt;
&lt;text&gt;I'm sorry I abandoned you like that.&lt;/text&gt;
&lt;/example&gt;
&lt;example&gt;
&lt;text&gt;Abandon ship!&lt;/text&gt;
&lt;label value="idiom"/&gt;
&lt;/example&gt;
&lt;sense id="abandon-verb-2"&gt;
&lt;label value="mostly-passive"/&gt;
&lt;definition&gt;to stop supporting an idea&lt;/definition&gt;
&lt;example&gt;
&lt;text&gt;That theory has been abandoned.&lt;/text&gt;
&lt;/example&gt;
&lt;/sense&gt;
&lt;/entry&gt;
&lt;lexicographicResource&gt;
</programlisting>
<xi:include href="source/0.xml.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
<example>
<title>JSON</title>
<programlisting>
{
"uri": "http://example.com",
"langCode": "en",
"entry": {
"id": "abandon-verb",
"headword": "abandon",
"partsOfSpeech": ["verb"],
"senses": [{
"id": "abandon-verb-1",
"definitions": [{
"text": "to suddenly leave a place or a person"
}],
"examples": [{
"text": "I'm sorry I abandoned you like that."
}, {
"text": "Abandon ship!",
"labels": ["idiom"]
}]
}, {
"id": "abandon-verb-2",
"labels": ["mostly-passive"],
"definitions": ["to stop supporting an idea"],
"examples": [{
"text": "That theory has been abandoned."
}]
}]
}
}
</programlisting>
<xi:include href="source/0.json.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
<example>
<title>RDF</title>
<programlisting>
&lt;#my-dictionary&gt; dmlex:entry &lt;#abandon-verb&gt; .

&lt;abandon-verb&gt; dmlex:headword "abandon" ;
dmlex:partOfSpeech "verb" ;
dmlex:sense &lt;#abandon-verb-1"&gt; , &lt;#abandon-verb-2&gt; .

&lt;#abandon-verb-1&lt; dmlex:definition [
dmlex:text "to suddenly leave a place or a person" ] ;
dmlex:example [
dmlex:text "I'm sorry I abandoned you like that."
] , [
dmlex:text "Abandon ship!" ;
dmlex:labels "idiom" ] .


&lt;#abandon-verb-2"&gt;
dmlex:label "mostly-passive" ;
dmlex:definition [
dmlex:text "to stop supporting an idea" ] ;
dmlex:example [
dmlex:text "That theory has been abandoned." ] .
</programlisting>
<xi:include href="source/0.rdf.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
</section>
36 changes: 6 additions & 30 deletions dmlex-v1.0/specification/examples/examples/01.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,14 @@
</example>
<example>
<title>XML</title>
<programlisting>
&lt;entry id="folúsghlantóir-n"&gt;
&lt;headword&gt;folúsghlantóir&lt;/headword&gt;
&lt;partOfSpeech tag="n-masc"/&gt;
&lt;inflectedForm tag="sg-gen"&gt;
&lt;text>folúsghlantóra&lt;/text>
&lt;/inflectedForm&gt;
&lt;inflectedForm tag="pl"&gt;
&lt;text>folúsghlantóirí&lt;/text>
&lt;/inflectedForm&gt;
&lt;sense&gt;...&lt;/sense&gt;
&lt;/entry&gt;
</programlisting>
<xi:include href="source/1.xml.xml"/>
</example>
<example>
<title>JSON</title>
<programlisting>
{
"id": "folúsghlantóir-n",
"headword": "folúsghlantóir",
"partsOfSpeech": ["n-masc"],
"inflectedForms": [{
"tag": "sg-gen",
"text": "folúsghlantóra"
}, {
"tag": "pl",
"text": "folúsghlantóirí"
}],
"senses": [...]
}
</programlisting>
<xi:include href="source/1.json.xml"/>
</example>
<example>
<title>RDF</title>
<xi:include href="source/1.rdf.xml"/>
</example>


</section>
27 changes: 6 additions & 21 deletions dmlex-v1.0/specification/examples/examples/02.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,14 @@
</example>
<example>
<title>XML</title>
<programlisting>
&lt;entry id="aardvark-noun"&gt;
&lt;headword&gt;aardvark&lt;/headword&gt;
&lt;pronunciation&gt;
&lt;transcription&gt;a:rdva:rk&lt;/transcription&gt;
&lt;/pronunciation&gt;
&lt;sense&gt;...&lt;/sense&gt;
&lt;/entry&gt;
</programlisting>
<xi:include href="source/2.xml.xml"/>
</example>
<example>
<title>JSON</title>
<programlisting>
{
"id": "aardvark-noun",
"headword": "aardvark",
"pronunciations": [{
"transcriptions": [{"text": "a:rdva:rk"}]
}],
"senses": [...]
}
</programlisting>
<xi:include href="source/2.json.xml"/>
</example>
<example>
<title>RDF</title>
<xi:include href="source/2.rdf.xml"/>
</example>


</section>
24 changes: 6 additions & 18 deletions dmlex-v1.0/specification/examples/examples/03.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,14 @@
</example>
<example>
<title>XML</title>
<programlisting>
&lt;entry id="aardvark-noun"&gt;
&lt;headword&gt;aardvark&lt;/headword&gt;
&lt;pronunciation soundFile="aardvark.mp3"/&gt;
&lt;sense&gt;...&lt;/sense&gt;
&lt;/entry&gt;
</programlisting>
<xi:include href="source/3.xml.xml"/>
</example>
<example>
<title>JSON</title>
<programlisting>
{
"id": "aardvark-noun",
"headword": "aardvark",
"pronunciations": [{
"soundFile": "aardvark.mp3"
}],
"senses": [...]
}
</programlisting>
<xi:include href="source/3.json.xml"/>
</example>
<example>
<title>RDF</title>
<xi:include href="source/3.rdf.xml"/>
</example>

</section>
27 changes: 6 additions & 21 deletions dmlex-v1.0/specification/examples/examples/04.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,14 @@
</example>
<example>
<title>XML</title>
<programlisting>
&lt;entry id="aardvark-noun"&gt;
&lt;headword&gt;aardvark&lt;/headword&gt;
&lt;pronunciation soundFile="aardvark.mp3"&gt;
&lt;transcription&gt;a:rdva:rk&lt;/transcription&gt;
&lt;/pronunciation&gt;
&lt;sense&gt;...&lt;/sense&gt;
&lt;/entry&gt;
</programlisting>
<xi:include href="source/4.xml.xml"/>
</example>
<example>
<title>JSON</title>
<programlisting>
{
"id": "aardvark-noun",
"headword": "aardvark",
"pronunciations": [{
"soundFile": "aardvark.mp3",
"transcriptions": [{"text": "a:rdva:rk"}]
}],
"senses": [...]
}
</programlisting>
<xi:include href="source/4.json.xml"/>
</example>
<example>
<title>RDF</title>
<xi:include href="source/4.rdf.xml"/>
</example>

</section>
74 changes: 6 additions & 68 deletions dmlex-v1.0/specification/examples/examples/05.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,76 +32,14 @@
</example>
<example>
<title>XML</title>
<programlisting>
&lt;lexicographicResource uri="http://example.com" langCode="ga"&gt;
&lt;entry id="folúsghlantóir-n"&gt;
&lt;headword&gt;folúsghlantóir&lt;/headword&gt;
&lt;partOfSpeech value="n-masc"/&gt;
&lt;inflectedForm tag="sg-gen"&gt;
&lt;text>folúsghlantóra&lt;/text>
&lt;/inflectedForm&gt;
&lt;inflectedForm tag="pl"&gt;
&lt;text>folúsghlantóirí&lt;/text>
&lt;/inflectedForm&gt;
&lt;sense&gt;...&lt;/sense&gt;
&lt;/entry&gt;
&lt;partOfSpeechTag tag="n-masc"&gt;
&lt;description&gt;masculine noun&lt;/description&gt;
&lt;/partOfSpeechTag&gt;
&lt;partOfSpeechTag tag="n-fem"&gt;
&lt;description&gt;feminine noun&lt;/description&gt;
&lt;/partOfSpeechTag&gt;
&lt;inflectedFormTag tag="sg-gen"&gt;
&lt;description&gt;singular genitive&lt;/description&gt;
&lt;forPartOfSpeech tag="n-masc"/&gt;
&lt;forPartOfSpeech tag="n-fem"/&gt;
&lt;/tag&gt;
&lt;tag value="pl"&gt;
&lt;description&gt;plural&lt;/description&gt;
&lt;target value="inflectedTag"/&gt;
&lt;forPartOfSpeech tag="n-masc"/&gt;
&lt;forPartOfSpeech tag="n-fem"/&gt;
&lt;/tag&gt;
&lt;/lexicographicResource&gt;
</programlisting>
<xi:include href="source/5.xml.xml"/>
</example>
<example>
<title>JSON</title>
<programlisting>
{
"uri": "http://example.com",
"langCode": "ga",
"entries": [{
"id": "folúsghlantóir-n",
"headword": "folúsghlantóir",
"partsOfSpeech": ["n-masc"],
"inflectedForms": [{
"tag": "sg-gen",
"text": "folúsghlantóra"
}, {
"tag": "pl",
"text": "folúsghlantóirí"
}],
"senses": [...]
}],
"partOfSpeechTags": [{
"tag": "n-masc",
"description": "masculine noun"
}, {
"tag": "n-fem",
"description": "feminine noun"
}],
"inflectedFormTags": [{
"tag": "sg-gen",
"description": "singular genitive"
"forPartsOfSpeech": ["n-masc", "n-fem"]
}, {
"tag": "pl",
"description": "plural",
"forPartsOfSpeech": ["n-masc", "n-fem"]
}]
}
</programlisting>
<xi:include href="source/5.json.xml"/>
</example>
<example>
<title>RDF</title>
<xi:include href="source/5.rdf.xml"/>
</example>

</section>
39 changes: 6 additions & 33 deletions dmlex-v1.0/specification/examples/examples/06.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,14 @@
</example>
<example>
<title>XML</title>
<programlisting>
&lt;partOfSpeechTag tag="n-masc"&gt;
&lt;description&gt;masculine noun&lt;/description&gt;
&lt;sameAs uri="http://www.lexinfo.net/ontology/3.0/lexinfo#noun"/&gt;
&lt;sameAs uri="http://www.lexinfo.net/ontology/3.0/lexinfo#masculine"/&gt;
&lt;/partOfSpeechTag&gt;
&lt;partOfSpeechTag tag="n-fem"&gt;
&lt;description&gt;feminine noun&lt;/description&gt;
&lt;sameAs uri="http://www.lexinfo.net/ontology/3.0/lexinfo#noun"/&gt;
&lt;sameAs uri="http://www.lexinfo.net/ontology/3.0/lexinfo#feminine"/&gt;
&lt;/partOfSpeechTag&gt;
</programlisting>
<xi:include href="source/6.xml.xml"/>
</example>
<example>
<title>JSON</title>
<programlisting>
{
"partOfSpeechTags": [{
"tag": "n-masc",
"description": "masculine noun",
"sameAs": [
"http://www.lexinfo.net/ontology/3.0/lexinfo#noun",
"http://www.lexinfo.net/ontology/3.0/lexinfo#masculine"
]
}, {
"tag": "n-fem",
"description": "feminine noun",
"sameAs": [
"http://www.lexinfo.net/ontology/3.0/lexinfo#noun",
"http://www.lexinfo.net/ontology/3.0/lexinfo#feminine"
]
}]
}
</programlisting>
<xi:include href="source/6.json.xml"/>
</example>
<example>
<title>RDF</title>
<xi:include href="source/6.rdf.xml"/>
</example>


</section>
Loading

0 comments on commit bc18c0b

Please sign in to comment.