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
52 changes: 32 additions & 20 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
branches:
- master
# Build (but do not deploy) on pull requests so that a broken specification,
# out-of-date example files or a failing ontology extraction are caught
# before they are merged.
pull_request:
branches:
- master
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand All @@ -12,54 +18,60 @@ permissions:
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
build:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository
- name: Check out the repository
uses: actions/checkout@v4

- name: Setup Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@v5

# Step 2: Set up Pandoc
- name: Install Pandoc
# Step 2: Install the tools
- name: Install Pandoc and Rapper
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install Rapper
run: |
sudo apt-get update
sudo apt-get install -y raptor2-utils

sudo apt-get install -y pandoc raptor2-utils
- name: Install Python Packages
run: |
python3 -m pip install --upgrade pip
python3 -m pip install beautifulsoup4 rdflib

# Step 3: Convert index.md to index.html
# Step 3: Check that the example files match their listings in index.md
- name: Check examples
run: python3 scripts/extract_examples.py --check

# Step 4: Convert index.md to index.html and extract the ontology
- name: Convert Markdown to HTML with Pandoc
run: pandoc --template respec.template -f markdown-auto_identifiers --wrap=none index.md -o index.html
- name: Expand tags
run: python3 expand_tags.py index.html index.html
- name: Convert RDFa to Turtle
run: rapper -i rdfa index.html -o turtle | python3 build_ontology.py morph

- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'

deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

11 changes: 3 additions & 8 deletions examples/example_1.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:cats a ontolex:Form ;

:cats a ontolex:Form ;
ontolex:writtenRep "cats"@en ;
morph:consistsOf :cat, :s .

Expand Down
11 changes: 3 additions & 8 deletions examples/example_10.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:aufgestanden a ontolex:Form ;

:aufgestanden a ontolex:Form ;
morph:consistsOf :auf , :ge, :stand , :en .

:perfect_tense_rule a morph:Rule ;
Expand Down
12 changes: 3 additions & 9 deletions examples/example_11.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .


:perfect_tense_rule a morph:Rule ;
morph:generates :aufgestanden-form .

Expand Down
11 changes: 3 additions & 8 deletions examples/example_12.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:lupus a ontolex:LexicalEntry ;

:lupus a ontolex:LexicalEntry ;
ontolex:canonicalForm :lupus_form ;
ontolex:morphologicalPattern :secondDeclension .

Expand Down
11 changes: 3 additions & 8 deletions examples/example_13.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:gen_sg_rule morph:generates :lupi ;

:gen_sg_rule morph:generates :lupi ;
morph:involves :i .

:i a ontolex:Affix ;
Expand Down
13 changes: 5 additions & 8 deletions examples/example_14.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <http://www.example.com/#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:adam a ontolex:LexicalEntry ;
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .

:adam a ontolex:LexicalEntry ;
ontolex:canonicalForm :adam_form ;
ontolex:morphologicalPattern :noun1_infl_vowelHarmony1 .

Expand Down
14 changes: 5 additions & 9 deletions examples/example_15.ttl
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:adamlari a ontolex:Form ;
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .

:adamlari a ontolex:Form ;
ontolex:writtenRep "adamlari"@tr ;
morph:grammaticalMeaning [
lexinfo:case lexinfo:accusative ;
lexinfo:case lexinfo:accusativeCase ;
lexinfo:number lexinfo:plural ] ;
morph:consistsOf :adam , :lar , :i .
12 changes: 4 additions & 8 deletions examples/example_16.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:rumpo a ontolex:LexicalEntry ;
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .

:rumpo a ontolex:LexicalEntry ;
ontolex:canonicalForm :rumpo_form ;
morph:baseForm :rupi_form , :ruptum_form ;
ontolex:morphologicalPattern :ThirdConjugation .
Expand Down
12 changes: 4 additions & 8 deletions examples/example_17.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:rumpis_form a ontolex:Form ;
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .

:rumpis_form a ontolex:Form ;
ontolex:writtenRep "rumpis"@la ;
morph:grammaticalMeaning :prs.act.ind.2.sg ;
morph:baseType lexinfo:presentStem .
Expand Down
12 changes: 4 additions & 8 deletions examples/example_18.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:schoenheit-entry a ontolex:LexicalEntry;
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .

:schoenheit-entry a ontolex:LexicalEntry;
ontolex:canonicalForm [ ontolex:writtenRep "Schönheit"@de ].
:schoen-entry a ontolex:LexicalEntry;
ontolex:canonicalForm [ ontolex:writtenRep "schön"@de ].
Expand Down
12 changes: 4 additions & 8 deletions examples/example_19.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:capostazione-entry a ontolex:LexicalEntry;
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .

:capostazione-entry a ontolex:LexicalEntry;
ontolex:canonicalForm [ ontolex:writtenRep "capostazione"@it ].
:capo-entry a ontolex:LexicalEntry;
ontolex:canonicalForm [ ontolex:writtenRep "capo"@it ].
Expand Down
12 changes: 4 additions & 8 deletions examples/example_2.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix : <http://www.example.com/#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:cats a ontolex:Form ;

:cats a ontolex:Form ;
ontolex:writtenRep "cats"@en ;
morph:consistsOf :cat, :s ;
rdf:_1 :cat ;
Expand Down
12 changes: 4 additions & 8 deletions examples/example_20.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .


:schoen_heit a morph:WordFormationRelation;
vartrans:source :schoen-entry;
vartrans:target :schoenheit-entry;
Expand Down
12 changes: 3 additions & 9 deletions examples/example_21.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .


:_heit-rule a morph:DerivationRule;
morph:replacement [
morph:sourceRegex "$" ;
Expand Down
12 changes: 4 additions & 8 deletions examples/example_22.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .


:schaapskop-entry a ontolex:LexicalEntry ;
ontolex:canonicalForm [ ontolex:writtenRep "schaapskop"@nl ] .
:schaap-entry a ontolex:LexicalEntry ;
Expand Down
12 changes: 4 additions & 8 deletions examples/example_23.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .


:scribo a ontolex:LexicalEntry ;
ontolex:canonicalForm :scribo_form ;
morph:baseForm :scriptum_form .
Expand Down
12 changes: 4 additions & 8 deletions examples/example_3.ttl
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@prefix : <http://www.example.com/#> .
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .
@prefix morph: <http://www.w3.org/ns/lemon/morph#> .
@prefix vartrans: <http://www.w3.org/ns/lemon/vartrans#> .
@prefix paralex: <https://www.paralex-standard.org/paralex_ontology.xml#> .
@prefix : <http://www.example.com/#> .:cats a ontolex:Form ;
@prefix lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#> .

:cats a ontolex:Form ;
ontolex:writtenRep "cats"@en ;
morph:grammaticalMeaning [ lexinfo:number lexinfo:plural ; ] ;
morph:consistsOf :cat, :s .
Expand Down
Loading
Loading