LexMeta OWL: Difference between revisions
From LexBib
No edit summary |
No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
The [[LexMeta]] metadata model for lexical resources is also | The [[LexMeta]] metadata model for lexical resources is also released as Web Ontology Language [http://www.wikidata.org/entity/Q826165 OWL] document, in [http://www.wikidata.org/entity/Q114409 Turtle] format. | ||
==Export== | ==Export== | ||
LexBib wikibase entities with a [[Property:P42|P42 "LexMeta OWL equivalent"]] statement are considered for the export. Their rdf:type is declared using the value of that statement's [[Property:P166|P166 "rdf:type (OWL)]] qualifier. If for that statement a [[Property:P167|P167 "skos:exactMatch"]] qualifier is | LexBib wikibase entities with a [[Property:P42|P42 "LexMeta OWL equivalent"]] statement are considered for the export. | ||
* Their rdf:type is declared using the value of that statement's [[Property:P166|P166 "rdf:type (OWL)]] qualifier. | |||
* If for that statement a [[Property:P167|P167 "skos:exactMatch"]] qualifier is found, that is also exported (that tipically points to the FRBR, MetaShare, or BIBO equivalent of the entity, see [[LexMeta]]). | |||
* For classes, "subclass of" ([[Property:P4|P4]]), and for properties, "subproperty of" ([[Property:P169|P169]]) are also considered. | |||
* Property "domain" ([[Property:P168|P168]]) and "range" ([[Property:P48|P48]]) are declared as separate statements, while "range" (in cases where the OWL range expression is complex) can be expressed using a [[Property:P170|P170]] "OWL range expression" qualifier (this is done where the range is a concept scheme, see e.g. [[Property:P127|P127]]). | |||
* Other statements for these entities are exported in case the LexBib wikibase property is also aligned (using [[Property:P42|P42]]) to a LexMeta OWL equivalent. The claim value, that is, the value of the wikibase property used in the /prop/direct/ namespace, is what is exported as value for the OWL equivalent property. | |||
** Statements pointing to other LexBib wikibase items are exported only if the object is also aligned to LexMeta OWL. | |||
** Other properties are mapped to datatype properties. | |||
** [[Property:P2|P2 "Wikidata Entity"]] statements and the LexBib wikibase entity URI itself are mapped to an object property called "lexmeta:wikibaseEntity". | |||
This method is implemented in a script found [https://github.com/dlindem/wikibase/blob/main/lexbib/build-lexmeta-owl.py here]. | |||
The resulting TTL file is found [https://github.com/pennyl67/LexMeta/blob/main/lexmeta.ttl here], from where a HTML documentation is generated using [https://ontoology.linkeddata.es/ Ontoology]. | |||
The | The HTML documentation is accessible here: http://metashare.ilsp.gr/ontologies/lex-meta/lex-meta/documentation/index-en.html | ||
* See wikibase properties and classes aligned to props and classes in outside-wikibase namespaces: [https://lexbib.elex.is/query/#%23%20gets%20LexMeta%20OWL%20entities%20with%20labels%20and%20exact_matches%0A%0APREFIX%20lwb%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fentity%2F%3E%0APREFIX%20ldp%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2Fdirect%2F%3E%0APREFIX%20lp%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2F%3E%0APREFIX%20lps%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2Fstatement%2F%3E%0APREFIX%20lpq%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2Fqualifier%2F%3E%0APREFIX%20lpr%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2Freference%2F%3E%0APREFIX%20lno%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2Fnovalue%2F%3E%0A%0Aselect%20%3Fentity%20%3Fowl_entity%20%28group_concat%28distinct%20str%28%3Fowl_class%29%3BSEPARATOR%3D%22%7C%22%29%20as%20%3Fowl_classes%29%0A%3Fexact_match%20%3Fowl_domain%20%3Fowl_range%20%3Fowl_range_expr%20%3Fowl_subPropOf%0A%28group_concat%28distinct%20concat%28%3FentityLabel%2C%22%40%22%2Clang%28%3FentityLabel%29%29%20%3BSEPARATOR%3D%22%7C%22%29%20as%20%3FentityLabels%29%0A%28group_concat%28distinct%20concat%28%3FaltLabel%2C%22%40%22%2Clang%28%3FaltLabel%29%29%20%3BSEPARATOR%3D%22%7C%22%29%20as%20%3FentityAltLabels%29%0A%28group_concat%28distinct%20str%28%3Fclose_match%29%3BSEPARATOR%3D%22%7C%22%29%20as%20%3Fclose_matches%29%0A%0Awhere%20%7B%0A%20%20%3Fentity%20lp%3AP42%20%3Fowl_statement%3B%0A%20%20%20%20%20%20%20%20%20%20rdfs%3Alabel%20%3FentityLabel.%0A%20%20%3Fowl_statement%20lps%3AP42%20%3Fowl_entity%3B%20lpq%3AP166%20%3Fowl_class.%0A%20%20optional%20%7B%3Fowl_statement%20lpq%3AP167%20%3Fexact_match%7D.%0A%20%20optional%20%7B%3Fowl_statement%20lpq%3AP169%20%3Fowl_subPropOf%7D.%0A%20%20optional%20%7B%3Fentity%20ldp%3AP168%20%3Fdomain.%20%3Fdomain%20ldp%3AP42%20%3Fowl_domain.%7D%0A%20%20optional%20%7B%3Fentity%20lp%3AP48%20%3Frange_statement.%20%3Frange_statement%20lps%3AP48%20%3Frange.%20%3Frange%20ldp%3AP42%20%3Fowl_range.%0A%20%20%09%09%09optional%20%7B%3Frange_statement%20lpq%3AP170%20%3Fowl_range_expr%20.%7D%7D%0A%20%20optional%20%7B%3Fentity%20lp%3AP74%20%5Blps%3AP74%20%3Fcoll%3B%20prov%3AwasDerivedFrom%20%5Blpr%3AP108%20%3Fclose_match%5D%5D%20.%0A%20%20%20%20%20%20%20%20%20%20%20%20values%20%3Fcoll%20%7Blwb%3AQ15469%20lwb%3AQ14512%7D%20%23%20lexInfo%20or%20GOLD%0A%09%09%09%7D%0A%0A%20optional%20%7B%3Fentity%20skos%3AaltLabel%20%3FaltLabel.%7D%0A%20%20%7D%0A%0Agroup%20by%20%3Fentity%20%3Fowl_entity%20%3Fowl_classes%20%3Fexact_match%0A%20%20%20%20%20%20%20%20%20%3Fowl_domain%20%3Fowl_range%20%3Fowl_range_expr%20%3Fowl_subPropOf%20%3FentityLabels%20%3FentityAltLabels%20%3Fclose_matches%0A Query]. | |||
* See instances of these classes that are considered for export: [https://lexbib.elex.is/query/#PREFIX%20lwb%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fentity%2F%3E%0APREFIX%20ldp%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2Fdirect%2F%3E%0APREFIX%20lp%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2F%3E%0APREFIX%20lps%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2Fstatement%2F%3E%0APREFIX%20lpq%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2Fqualifier%2F%3E%0APREFIX%20lpr%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2Freference%2F%3E%0APREFIX%20lno%3A%20%3Chttps%3A%2F%2Flexbib.elex.is%2Fprop%2Fnovalue%2F%3E%0A%0A%23%20gets%20subject%2C%20prop%2C%20obj%20for%20LexMeta-relevant%20properties%0A%0Aselect%20%3Fs%20%3Flexmeta_owl_subj%20%3Fp%20%3Fedge%20%3Flexmeta_owl_prop%20%3Fo%20%3Flexmeta_owl_obj%20%3Fobj_datatype%0Awhere%20%7B%0A%20%20%3Fs%20%3Fp%20%3Fo%20%3B%0A%20%20%20%20%20lp%3AP42%20%5Blps%3AP42%20%3Flexmeta_owl_subj%3B%20lpq%3AP166%20%3Fowl_class%5D%20.%0A%20%20%3Fedge%20wikibase%3AdirectClaim%20%3Fp%3B%0A%20%20%20%20%20%20%20%20ldp%3AP42%20%3Flexmeta_owl_prop%20%3B%0A%20%20%20%20%20%20%20%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23propertyType%3E%20%3Fobj_datatype%20.%0A%20%20optional%20%7B%3Fo%20ldp%3AP42%20%3Flexmeta_owl_obj%20.%7D%0A%20%20%7D%0A Query]. |
Latest revision as of 15:11, 15 August 2023
The LexMeta metadata model for lexical resources is also released as Web Ontology Language OWL document, in Turtle format.
Export
LexBib wikibase entities with a P42 "LexMeta OWL equivalent" statement are considered for the export.
- Their rdf:type is declared using the value of that statement's P166 "rdf:type (OWL) qualifier.
- If for that statement a P167 "skos:exactMatch" qualifier is found, that is also exported (that tipically points to the FRBR, MetaShare, or BIBO equivalent of the entity, see LexMeta).
- For classes, "subclass of" (P4), and for properties, "subproperty of" (P169) are also considered.
- Property "domain" (P168) and "range" (P48) are declared as separate statements, while "range" (in cases where the OWL range expression is complex) can be expressed using a P170 "OWL range expression" qualifier (this is done where the range is a concept scheme, see e.g. P127).
- Other statements for these entities are exported in case the LexBib wikibase property is also aligned (using P42) to a LexMeta OWL equivalent. The claim value, that is, the value of the wikibase property used in the /prop/direct/ namespace, is what is exported as value for the OWL equivalent property.
- Statements pointing to other LexBib wikibase items are exported only if the object is also aligned to LexMeta OWL.
- Other properties are mapped to datatype properties.
- P2 "Wikidata Entity" statements and the LexBib wikibase entity URI itself are mapped to an object property called "lexmeta:wikibaseEntity".
This method is implemented in a script found here.
The resulting TTL file is found here, from where a HTML documentation is generated using Ontoology.
The HTML documentation is accessible here: http://metashare.ilsp.gr/ontologies/lex-meta/lex-meta/documentation/index-en.html