Repository navigation
Bring the specification in line with the OntoLex style guide - #87
Merged
Merged
Conversation
- Example files are generated from the listings in index.md by scripts/extract_examples.py (named by src, prefixes from the Namespaces section); CI checks that they are up to date and runs on pull requests. - Captions without the redundant "Example:" prefix, and without Markdown or CURIEs in them. - References to the core use data-cite with a single "ontolex" localBiblio entry for the published OntoLex-Lemon report, with anchors that exist there. - Prose: code-style and CURIE references replaced by term links and natural wording; example words in italics. - LexInfo: accusative -> accusativeCase; stem types that LexInfo does not define move to the example namespace. - English labels in Title Case with lang="en". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jmccrae
commented
Nov 26, 2026
| </aside> | ||
|
|
||
| In order to generate forms of the entry `:adam`, all the rules associated with the corresponding morphological pattern must first be extracted, namely `sg_rule`, `pl_rule`, and `acc_rule`. Next, we must establish the order of inflection slots mentioned in the rules (by looking for the slot that is not used as an object in a [=next=] property). | ||
| In order to generate forms of the entry *adam*, all the rules associated with the corresponding morphological pattern must first be extracted, namely *sg_rule*, *pl_rule*, and *acc_rule*. Next, we must establish the order of inflection slots mentioned in the rules (by looking for the slot that is not used as an object in a [=next=] property). |
Collaborator
Author
There was a problem hiding this comment.
Does this actually fit the style guide?
|
|
||
| <div class="note"> | ||
| In the two examples above, a Morph instance (`:i`) was not defined in the original data and was generated by the generation implementation. | ||
| In the two examples above, a [=morph=] (*i*) was not defined in the original data and was generated by the generation implementation. |
Collaborator
Author
There was a problem hiding this comment.
should still be :i as referencing code in the example
| The values of a base type are URLs that can be further specified in a local | ||
| ontology and some examples values are provided by [LexInfo](https://github.com/ontolex/lexinfo). | ||
| The values of a base type are IRIs that can be further specified in a local | ||
| ontology. In the examples below they are defined in the example namespace. |
Collaborator
Author
There was a problem hiding this comment.
This change should probably not be made as we are expecting ontolex/lexinfo#48
| To be able to not only encode this descriptive information but also possibly further specify it by expressing additional details, in OntoLex-Morph, word formation relations are reified in a dedicated class, [=word formation rule=]. | ||
| Since word formation relations are relations between different lexical entries, this class is defined as a subclass of the class introduced in the <a data-cite="vartrans">vartrans</a> module of OntoLex for such relations -- namely, <a data-cite="vartrans#LexicalRelation">lexical relation</a>. | ||
| As a consequence, vartrans properties are also used to link lexical entries to the relations holding between them: specifically, each word formation relation is linked through [=source=] to its base(s) and through [=target=] to the derivative. | ||
| Since word formation relations are relations between different lexical entries, this class is defined as a subclass of the class introduced in the <a data-cite="ontolex#variation-translation-vartrans">variation and translation</a> module of OntoLex for such relations -- namely, <a data-cite="ontolex#LexicalRelation">lexical relation</a>. |
Collaborator
Author
There was a problem hiding this comment.
Shouldn't it be vartrans (no link) according to the style guide
| The same kind of modelling can be applied to compounds -- i.e., lexemes that are morphologically related to two or more bases; e.g. English *wallpaper*. | ||
|
|
||
| It should be noted that there is another OntoLex module that was envisaged to be usable also for compounding, namely <a data-cite="decomp">decomp</a>, devised for the decomposition of complex lexical entries (like Multi-Word Expressions) in their parts. However, in OntoLex-<a data-cite="decomp">decomp</a>, the relationship between complex lexical entries and their parts is not reified, as there is no dedicated class, differently than what happens in OntoLex-morph for word formation relations. | ||
| It should be noted that there is another OntoLex module that was envisaged to be usable also for compounding, namely the <a data-cite="ontolex#decomposition-decomp">decomposition</a> module, devised for the decomposition of complex lexical entries (like Multi-Word Expressions) in their parts. However, in the decomposition module, the relationship between complex lexical entries and their parts is not reified, as there is no dedicated class, differently than what happens in OntoLex-morph for word formation relations. |
Collaborator
Author
There was a problem hiding this comment.
As above, check style guide for referencing module
| It should be noted that there is another OntoLex module that was envisaged to be usable also for compounding, namely the <a data-cite="ontolex#decomposition-decomp">decomposition</a> module, devised for the decomposition of complex lexical entries (like Multi-Word Expressions) in their parts. However, in the decomposition module, the relationship between complex lexical entries and their parts is not reified, as there is no dedicated class, differently than what happens in OntoLex-morph for word formation relations. | ||
|
|
||
| As a consequence, to allow for a parallel treatment of different word formation processes (derivation and compounding), a subclass of [=Word Formation Relation=] is introduced for compounding -- namely, [=Compound Relation=]. This can be considered as a reification of the property <a data-cite="decomp#subterm">sub term</a> introduced in the <a data-cite="decomp">decomp</a> module of OntoLex, which can be used to decompose lexical entries into other lexical entries: hence, the existence of a compound relation entails that the source lexical entry is a subterm of the compound. | ||
| As a consequence, to allow for a parallel treatment of different word formation processes (derivation and compounding), a subclass of [=Word Formation Relation=] is introduced for compounding -- namely, [=Compound Relation=]. This can be considered as a reification of the property <a data-cite="ontolex#subterm">sub term</a> introduced in the <a data-cite="ontolex#decomposition-decomp">decomposition</a> module of OntoLex, which can be used to decompose lexical entries into other lexical entries: hence, the existence of a compound relation entails that the source lexical entry is a subterm of the compound. |
Collaborator
Author
There was a problem hiding this comment.
subterm is one word
| :scribo_form a ontolex:Form ; | ||
| ontolex:writtenRep "scribo"@la ; | ||
| morph:baseType lexinfo:presentStem . | ||
| morph:baseType :presentStem . |
Collaborator
Author
There was a problem hiding this comment.
As above, these will be added to LexInfo
…y were, name modules in italics; fix the example check - Example resources referred to in the text stay as code (:i, :adam, :sg_rule). - The LexInfo stem values are kept (they are being added in ontolex/lexinfo#48). - Modules are named *vartrans* and *decomp* in italics, without links. - "subterm" as one word. - Regenerate the example files changed since the last extraction (this was the CI failure), and let extract_examples.py exit 0 after writing files. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies the OntoLex style guide (
STYLE.md, ontolex/ontolex#120) to the Morphology module.Examples: the listings in
index.mdare the sourcescripts/extract_examples.py(the same script as Listings in index.md as the source of the examples; example captions ontolex#121) replaces the old extractor. It writes each listing to the file named in itssrc(no longer numbered by position), with only the prefixes the listing uses, taken from the Namespaces section.--checkfails if a file is out of date, a listing does not parse or a.ttlfile is unused.scripts/extract_examples.shis removed.@prefix : <http://www.example.com/#>is now in the Namespaces listing rather than only in the text.Captions
morph:DerivationRuleis reworded.References to the core:
data-citelocalBiblionow has a singleontolexentry for the published OntoLex-Lemon report (https://www.w3.org/2016/05/ontolex/), instead of three entries pointing to the stale 2015 draft atontolex.github.io/ontolex/specification.html.vartrans#…anddecomp#…citations useontolex#…, and the anchors that did not exist there are fixed (CanonicalForm→canonicalForm,MorphologicalPattern→morphologicalPattern). The vartrans and decomp modules are named in italics, without links.[=source=]/[=target=], which ReSpec could not resolve; they are nowdata-citelinks. Together with the module references this fixes the four ReSpec errors; the page now has no errors or warnings.Wording
rdfs:subClassOf,consistsOf,rdf:Seq,morph:sourceRegex/targetRegexin the prose are replaced by term links or linked natural wording. Example resources referred to in the text are written as code, as in the listing (:adam,:sg_rule). Regex syntax andrdf:_1/rdf:_2stay as code.LexInfo
lexinfo:accusativedoes not exist in LexInfo 3.0 →lexinfo:accusativeCase.lexinfo:presentStem,perfectStemandthirdStemare kept; they are being added to LexInfo in Add BaseType values for morph:baseType lexinfo#48.Labels
rdfs:labels are in Title Case withlang="en", and the two<dataProperty>label tags are now<datatypeProperty>. In the extracted ontology, only the case of 13 labels and the comment of Word Formation Relation change.morph.ttlis not regenerated in this PR (see below).🤖 Generated with Claude Code