Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build_ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def convert_turtle(input_data, base_url, custom_namespaces=NAMESPACES):
cleaned_value = str(o).strip()
# Remove any tags like [=text=]
cleaned_value = cleaned_value.replace("[=", "").replace("=]", "")
# Pandoc turns the space after abbreviations such as "e.g." into a
# non-breaking space, which does not belong in the ontology
cleaned_value = cleaned_value.replace("\u00a0", " ")
# Recreate the Literal with original datatype/language tag
new_o = Literal(cleaned_value, lang=o.language, datatype=o.datatype)
cleaned_g.add((s, p, new_o))
Expand Down
6 changes: 3 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ The <dfn>grammatical meaning</dfn> property assigns a grammatical meaning to a m

<div class="description">
<domain>ontolex:Form OR [=Morph=] OR [=Rule=]</domain>
<range>[=Grammatical Meaning=]</range>
<range>[=Grammatical Meaning Value=]</range>
</div>
</div>

Expand All @@ -306,7 +306,7 @@ For instance, we can update the previous example of the English plural form *cat

In this case, we create a blank node for the grammatical meaning that corresponds to a single feature in Lexinfo. We could also define instances for common morphological meanings and reuse these objects.

For example, in the Latin form *lupus*, the nominative case and singular number are expressed cumulatively by the affix *-us*. This is a common combination; therefore, an instance of [=Grammatical Meaning=] is introduced for that feature bundle. This time we use Lexinfo vocabulary alongside the [Paralex vocabulary](https://www.paralex-standard.org/) — even though Lexinfo is the preferred way to represent grammatical features in OntoLex, there is no restriction on this.
For example, in the Latin form *lupus*, the nominative case and singular number are expressed cumulatively by the affix *-us*. This is a common combination; therefore, an instance of [=Grammatical Meaning Value=] is introduced for that feature bundle. This time we use Lexinfo vocabulary alongside the [Paralex vocabulary](https://www.paralex-standard.org/) — even though Lexinfo is the preferred way to represent grammatical features in OntoLex, there is no restriction on this.

<aside class="example" src="examples/example_4.ttl" title="Example: Segmentation of the Latin nominative singular form 'lupus'">

Expand Down Expand Up @@ -350,7 +350,7 @@ The property [=base constraint=] is used to encode information about morphosynta

<domain>[=Morph=] OR [=Rule=]</domain>

<range>[=Grammatical Meaning=]</range>
<range>[=Grammatical Meaning Value=]</range>
</div>
</div>

Expand Down
67 changes: 40 additions & 27 deletions morph.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,28 @@

<http://www.w3.org/ns/lemon/morph> a owl:Ontology ;
rdfs:label "The OntoLex Module for Morphology"@en ;
dcterms:title "The OntoLex Module for Morphology"@en ;
cc:license <https://creativecommons.org/publicdomain/zero/1.0/> ;
dcterms:contributor "Christian Chiarcos",
"John P. McCrae",
"Matteo Pellegrini",
"Maxim Ionov" ;
dcterms:creator "Bettina Klimek",
"Fahad Khan",
"James K. Tauber",
"Jesse De Does",
"Julia Bosque-Gil",
"Katerina Gkirtzou",
"Katrien Depuydt",
"Penny Labropoulou",
"Stefania Racioppa",
"Thierry Declerck" ;
dcterms:description "The OntoLex Morphology module (morph) extends the OntoLex-Lemon core model with classes and properties for the morphological decomposition of lexical entries and forms, and for the representation of morphological rules and inflection classes."@en ;
dcterms:creator "Julia Bosque-Gil", "Thierry Declerck", "Jesse De Does", "Katrien Depuydt", "Katerina Gkirtzou", "Fahad Khan", "Penny Labropoulou", "Stefania Racioppa", "James K. Tauber", "Bettina Klimek" ;
dcterms:contributor "Christian Chiarcos", "Maxim Ionov", "John P. McCrae", "Matteo Pellegrini" ;
dcterms:publisher <http://www.w3.org/community/ontolex> ;
dcterms:rights "CC-Zero" ;
cc:license <https://creativecommons.org/publicdomain/zero/1.0/> ;
dcterms:rights "CC-Zero"@en ;
dcterms:title "The OntoLex Module for Morphology"@en ;
rdfs:seeAlso <https://www.w3.org/community/ontolex/> ;
owl:imports <http://www.w3.org/ns/lemon/ontolex> , <http://www.w3.org/ns/lemon/vartrans> .
owl:imports <http://www.w3.org/ns/lemon/ontolex>,
<http://www.w3.org/ns/lemon/vartrans> .

morph:CompoundHead a owl:Class ;
rdfs:label "Compound Head"@en ;
Expand Down Expand Up @@ -60,16 +73,10 @@ morph:consistsOf a owl:ObjectProperty ;
rdfs:range morph:Morph ;
rdfs:subPropertyOf rdfs:member .

morph:ruleExample a owl:DatatypeProperty ;
rdfs:label "rule example"@en ;
rdfs:comment "A rule example is a single form that demonstrates a class of forms that can be generated by a single rule with no allomorphy."@en ;
rdfs:domain morph:Rule ;
rdfs:range rdf:langString .

morph:generates a owl:ObjectProperty ;
rdfs:label "generates"@en ;
rdfs:comment "The generates property connects a rule to the form generated from it."@en ;
rdfs:domain morph:WordFormationRule ;
rdfs:domain morph:Rule ;
rdfs:range ontolex:Form .

morph:grammaticalMeaning a owl:ObjectProperty ;
Expand All @@ -84,12 +91,6 @@ morph:inflection a owl:ObjectProperty ;
rdfs:domain morph:InflectionRule ;
rdfs:range morph:InflectionClass .

morph:slot a owl:ObjectProperty ;
rdfs:label "slot"@en ;
rdfs:comment "The slot property links an inflection rule to the inflection slot it pertains to"@en ;
rdfs:domain morph:InflectionRule ;
rdfs:range morph:InflectionSlot .

morph:involves a owl:ObjectProperty ;
rdfs:label "involves"@en ;
rdfs:comment "The involves property links a Rule to the Morph that is involved in the process."@en ;
Expand All @@ -108,6 +109,18 @@ morph:replacement a owl:DatatypeProperty ;
rdfs:domain morph:Rule ;
rdfs:range morph:ReplacementFormula .

morph:ruleExample a owl:DatatypeProperty ;
rdfs:label "rule example"@en ;
rdfs:comment "A rule example is a single form that demonstrates a class of forms that can be generated by a single rule with no allomorphy."@en ;
rdfs:domain morph:Rule ;
rdfs:range rdf:langString .

morph:slot a owl:ObjectProperty ;
rdfs:label "slot"@en ;
rdfs:comment "The slot property links an inflection rule to the inflection slot it pertains to."@en ;
rdfs:domain morph:InflectionRule ;
rdfs:range morph:InflectionSlot .

morph:sourceRegex a owl:DatatypeProperty ;
rdfs:label "source regex"@en ;
rdfs:comment "A source regex is a string pattern which is used as a basis for the substitution."@en ;
Expand All @@ -126,6 +139,8 @@ morph:wordFormation a owl:ObjectProperty ;
rdfs:domain morph:WordFormationRelation ;
rdfs:range morph:WordFormationRule .

ontolex:Affix rdfs:subClassOf morph:Morph .

morph:CompoundRelation a owl:Class ;
rdfs:label "Compound Relation"@en ;
rdfs:comment "Compound Relation is a Word Formation Relation that connects a (lexical entry representing a) morphological constituent of a compound with the (lexical entry representing the) compound."@en ;
Expand All @@ -137,7 +152,7 @@ morph:InflectionClass a owl:Class ;

morph:GrammaticalMeaningValue a owl:Class ;
rdfs:label "Grammatical Meaning Value"@en ;
rdfs:comment "Grammatical meaning value can be used to represent (bundles of) values of different morpho-syntactic or morpho-semantic features expressed by a form, morph or rule (e.g., value ‘nominative’ for feature ‘case’, value ‘singular’ for feature ‘number’, etc.; or the feature bundle composed by the latter two values, in a fusional language where they are expressed cumulatively, e.g. Latin)"@en .
rdfs:comment "Grammatical meaning value can be used to represent (bundles of) values of different morpho-syntactic or morpho-semantic features expressed by a form, morph or rule (e.g., value ‘nominative’ for feature ‘case’, value ‘singular’ for feature ‘number’, etc.; or the feature bundle composed by the latter two values, in a fusional language where they are expressed cumulatively, e.g. Latin)"@en .

morph:RegexReplacement a owl:Class ;
rdfs:label "Regex Replacement"@en ;
Expand All @@ -162,18 +177,16 @@ morph:InflectionSlot a owl:Class ;
rdfs:label "Inflection Slot"@en ;
rdfs:comment "Inflection slot represents a single slot that can be filled with a morph of a corresponding grammatical category. Since one rule can introduce only one morph, inflection slots are necessary when we need to represent forms that are generated by several independent morphological processes."@en .

morph:Morph a owl:Class ;
rdfs:label "Morph"@en ;
rdfs:comment "A Morph represents any element of morphological analysis below the word level."@en ;
rdfs:subClassOf ontolex:LexicalEntry .

ontolex:Affix rdfs:subClassOf morph:Morph .

morph:WordFormationRule a owl:Class ;
rdfs:label "Word Formation Rule"@en ;
rdfs:comment "Word Formation Rule represents the formal operation applied to a base form of a source lexical entry to obtain the (canonical) form of another, target lexical entry ."@en ;
rdfs:subClassOf morph:Rule .

morph:Morph a owl:Class ;
rdfs:label "Morph"@en ;
rdfs:comment "A Morph represents any element of morphological analysis below the word level."@en ;
rdfs:subClassOf ontolex:LexicalEntry .

morph:Rule a owl:Class ;
rdfs:label "Rule"@en ;
rdfs:comment "A rule represents the formal operation applied to a base form to obtain another form (inflectionally or derivationally related to it). It must contain either ‘rule example’ or ‘replacement’ (or both). In addition, a human-readable string representation of a morph should be provided as an RDFS label, e.g. “-s”@en for usual PL in English. One rule applies exactly one morphological transformation, i.e. adds one morph."@en .
Expand Down