All questions and comments about or in any way related to OTTR (http://ottr.xyz) are welcome here!
:PatternInstance(?iri, ?pattern) :: { ottr:Triple( ?iri, :isInstanceOf , ?pattern ) }
. And i reuse it inside the templates i'm interested to extract. Then i can simply query with: SELECT ?instance WHERE { ?instance :isInstanceOf <my_pattern> }
--fetchMissing
? Do i need to expand them and store them as pure RDF? It's okei to declare all the templates in a file and resolve them via hash dereferentiation? I tried like this but didn't work ottr/lutra/lutra#259
—fetchMissing
, your templates need to be hosted at the address as specified in the template’s IRI.
[ERROR] Unknown template http://arco.istc.cnr.it/tpl/odp#Collection.
[FATAL] Fetch missing template: http://arco.istc.cnr.it/tpl/odp#Collection
[FATAL] Attempts of parsing library on all available formats {wottr=xyz.ottr.lutra.wottr.WottrFormat@381d7219, stottr=xyz.ottr.lutra.stottr.StottrFormat@49fe3142, tabottr=xyz.ottr.lutra.tabottr.TabottrFormat@13fed1ec, bottr=xyz.ottr.lutra.bottr.BottrFormat@61c42416} failed with following errors:
[ERROR] Attempt of parsing templates as xyz.ottr.lutra.stottr.parser.STemplateParser@615e3f51 format failed:
[ERROR] Error reading stOTTR file: 'http://arco.istc.cnr.it/tpl/odp#Collection': http:/arco.istc.cnr.it/tpl/odp#Collection
[FATAL] Attempt of parsing templates as xyz.ottr.lutra.wottr.parser.WTemplateParser@f72203 format failed:
[ERROR] Error getting property value for ottr:parameters for subject 'odp-tpl:Collection'. Expected exactly 1 object, but got 0.
[ERROR] Error parsing RDF sourceString http://arco.istc.cnr.it/tpl/odp#Collection. null
[FATAL] [line: 8, col: 22] Undefined prefix: rdf
rdf:
, ottr:
and odp-col:
as far as I can see
:Template[ ?param1, ?param2 ] :: {
:Triple(?param1, a, :something),
:Triple(?param2, a, :something)
}
:Triple(?param2, a, :something)
not created
NestedTemplate[List<ottr:IRI> ?list] :: {
cross
| ottr:Triple(++?list, rdf:type, rdf:Resource)
}
Template[List<ottr:IRI> ?list, ottr:IRI ?extraElement] :: {
NestedTemplate((?list, ?extraElement)) ???
}
Thanks Martin.. Your docs are great; I just wanted a “quick” injection beyond your three videos on vimeo to help me sorting my understanding on a few things I dont understand quite yet (lists of complex expressions, like (R some (A1 and A2), R some (B1 and B2) etc, just want to know whether these are in theory possible). And beyond all the cool stuff you have, i need to know more about instance matching (from ontology and teemplate, extract all instances from an ontology). Lastly, I was trying to find out how far your string templating goes (generating labels, synonyms using filler terms similar to https://github.com/obophenotype/upheno/blob/68378084c5c0f0a069342a49fbb6f94071be7a8d/src/patterns/dosdp-patterns/abnormalLevelOfChemicalEntityInLocation.yaml#L32
No need to answer now, i will keep looking :)
instance matching (from ontology and teemplate, extract all instances from an ontology)
This is not supported yet, but high on the list. The plan is to support converting an OTTR template into a SPARQL query whose results are the instances in the queried source. In the simple case, with no optionals and list expanders, this should be trivial, and was indeed implemented in ca. 0.2 version of Lutra.
string templating
We do not support this yet either, but intend to implement this as a separate functional language for manipulating terms. The idea is to separate term manipulations from "fact stating", which templates can be seen as. There will be libraries of functions like there are libraries of templates. Plan is to support xpath functions and then combinations of these.
(lists of complex expressions, like (R some (A1 and A2), R some (B1 and B2)
There are several ways to answer this. Could you say more what the end goal for this is?
Thank you for the prompt answers! Sounds good! So it seems you have really funding to support Ottr? Are there long-term plans to develop support and maintain it?
Re the complex expression thing: its not actually that wild, because 90% of the cases are covered by R some A (a being atomic), akin to your Pizza and has-topping examples. However, there are some cases where you say want to define a disease in terms of genes causing it, with those genes being expressed in a specific location (like a cell type); note this example is for illustration only; dont know whether you would define it in such a way. So you would get things like C = Disease and (has cause some (Gene1 and expressed in Location1)) and (has cause some (Gene2 and expressed in Location2)) etc etc. Its not that important.. I am just charged with looking a bit around at existing templating systems. Thanks for you help!
So it seems you have really funding to support Ottr? Are there long-term plans to develop support and maintain it?
Yes, we do. OTTR is developed within the SIRIUS centre: https://sirius-labs.no/ with several interested industry partners.
Re the complex expression thing
You cannot really pass complex expressions as arguments, but you can represent them by a blank node which is then passed on, which can be seen in the Pizza example where a blank node "joins" two template instances:
ax:SubObjectAllValuesFrom(?pizza, ex:hasTopping, _:toppingsUnion),
rstr:ObjectUnionOf(_:toppingsUnion, ?toppings),
If the hasCause
+ expressedIn
is a pattern, then this could be a case of the zip
list expander.
But there are limitations, see example 5 in http://ceur-ws.org/Vol-2459/paper2.pdf
Hi all, we are in the process of collecting input to steer the development of Lutra and OTTR. What are your favourite missing functionality/bugs/issues with Lutra and OTTR? Please send a list, add new issues to our issue list, or give votes to existing issues:
https://gitlab.com/ottr/lutra/lutra/-/issues
High on our list are:
Represent parameter variables as IRIs, not blank nodes
ottr/lutra/lutra#282
Improve error messages
ottr/lutra/lutra#53
Thanks!
Martin
org.h2.Driver
.
Is there a problem in the rdfs template library? Using o-rdfs:TypedResourceDescription, I see this:
[WARNING] Suspicious argument value: ottr:draft : LUB<ottr:IRI>. The value is in the ottr namespace: http://ns.ottr.xyz/0.4/
at [1: 1] (xyz.ottr.lutra.model.Template) http://tpl.ottr.xyz/rdfs/0.2/TypedResourceDescription[ ?blan ...
Is there a problem in the rdfs template library? Using o-rdfs:TypedResourceDescription, I see this:
[WARNING] Suspicious argument value: ottr:draft : LUB<ottr:IRI>. The value is in the ottr namespace: http://ns.ottr.xyz/0.4/at [1: 1] (xyz.ottr.lutra.model.Template) http://tpl.ottr.xyz/rdfs/0.2/TypedResourceDescription[ ?blan ...
Thanks, this problem is documented here: ottr/lutra/lutra#268. We are in the process of fixing it.
The strange thing is, even with the --quiet switch, these warnings are included in the output..
This sounds like a bug, could you file it as an issue where you include the full set of CLI options used?