Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Martin G. Skjæveland
@m.g.skjaeveland_gitlab

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?

Nico Matentzoglu
@matentzn

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!

Martin G. Skjæveland
@m.g.skjaeveland_gitlab

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.

Martin G. Skjæveland
@m.g.skjaeveland_gitlab

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

Martin G. Skjæveland
@m.g.skjaeveland_gitlab
Let me add that we have not yet discussed if and how to tackle the cases that are given in the above paper.
Nico Matentzoglu
@matentzn
That sounds all great and thank you very much for taking the time to consider it. I will come back to you after I have had a play.. Things are moving.. slowly.. here now! Thank you!
Martin G. Skjæveland
@m.g.skjaeveland_gitlab

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:

Thanks!

Martin

Johan Wilhelm Klüwer
@johanw_gitlab
I'm about to read data from a csv file, using an H2Source in bottr. In the H2 documentation, it says you can switch the SQL dialect -- as in, "MODE=MSSQLServer " at http://www.h2database.com/html/features.html?highlight=MSSQLServer&search=mssql#firstFound -- is there a way to give this switch in the ottr:source declaration?
Martin G. Skjæveland
@m.g.skjaeveland_gitlab
@johanw_gitlab , the way to go is to use a jdbc source: https://spec.ottr.xyz/bOTTR/0.1/#2.3.3_JDBCSource. The ottr:H2Source is really just short hand for a H2 jdbc source. The jdbc driver should be set to org.h2.Driver.
Johan Wilhelm Klüwer
@johanw_gitlab
Great, thanks a lot!
Johan Wilhelm Klüwer
@johanw_gitlab

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 ...

Johan Wilhelm Klüwer
@johanw_gitlab
The strange thing is, even with the --quiet switch, these warnings are included in the output..
(the output is otherwise ok)
Johan Wilhelm Klüwer
@johanw_gitlab
Actually, switching from version 0.2 of o-rdfs: to version 0.1 solves the problem for now.
Martin G. Skjæveland
@m.g.skjaeveland_gitlab

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?

Johan Wilhelm Klüwer
@johanw_gitlab
I'm seeing a problem with o-owl-dec:ObjectProperty that relates to the "version 0.2" issue. This template expands to o-rdfs:TypedResourceDescription, which is in the 0.2 version (from the namespace). Does this mean o-owl-dec:ObjectProperty is currently not usable?
Johan Wilhelm Klüwer
@johanw_gitlab
Another thing. It seems there's no template for creating the inverse of an OWL property?
Martin G. Skjæveland
@m.g.skjaeveland_gitlab

I'm seeing a problem with o-owl-dec:ObjectProperty that relates to the "version 0.2" issue. This template expands to o-rdfs:TypedResourceDescription, which is in the 0.2 version (from the namespace). Does this mean o-owl-dec:ObjectProperty is currently not usable?

"Not usable" is a bit strong. It is true that o-owl-dec:ObjectProperty depends on a template (o-rdfs:TypedResourceDescription, version 0.2) that will give a WARNING (which can be safely ignored) since the template contains a ottr: vocabulary element that Lutra does not recognize. (This is caused by the fact we have introduced vocabulary elements (e.g., ottr:draft)that are not yet included in the wOTTR ontology. They are now in the development version of the vocabulary (http://dev.spec.ottr.xyz/wOTTR/) which is finally our the door due to fixed issues with the SHACL tests and CI/CD setup. The WARNING should disappear if Lutra is rebuilt. A new version of Lutra will be available shortly -- pending the merge of a MR.

Another thing. It seems there's no template for creating the inverse of an OWL property?

Yes, I think you are correct. This is not on purpose, we take no issue against inverse properties! :D Suggestions for templates are welcome.

Martin G. Skjæveland
@m.g.skjaeveland_gitlab
@johanw_gitlab , the irritating WARNING is now removed. It is available in the develop branch https://gitlab.com/ottr/lutra/lutra/-/jobs/artifacts/develop/raw/lutra.jar?job=snapshot . A new master release is pending a different issue, which has to do with releasing lutra as a maven artefact.
Martin G. Skjæveland
@m.g.skjaeveland_gitlab
Martin G. Skjæveland
@m.g.skjaeveland_gitlab

The 1st OTTR user forum will take place virtually on 2021-01-28 Thu
12:00--14:00 CET. The purpose of the event is to let users of the OTTR
framework share experiences and to meet the developers behind OTTR to
discuss future directions. The event should also be of interest to
those that are curious to see practical uses of the OTTR framework.
We also welcome input and presentations of tools and technologies that
are related to OTTR.

Preliminary agenda:

  1. OTTR team: current status and future plans
  2. Q&A
  3. Invited talk: Johan W. Klüwer
  4. Shorter talks
  5. Discussion

Register here: https://ottr.xyz/event/2021-01-28-user-forum/

Veronika Heimsbakk
@veleda

Hi! I have created OTTR templates for every constraint in the SHACL Core vocabulary, but I wonder if it is possible to nest templates in the instance declaration? So I do not have to repeat myself by passing ShapeURI and pathURI for every instance declaration of any constraint.
Example of wanted instance declaration:

o-sh:PropertyShape(ex:ShapeURI, ex:pathURI, 
  ( o-sh:MinCount(1), 
    o-sh:MaxCount(1), 
    o-sh:Pattern("^[a-zA-Z]+$")
  )
)

With expected result:

ex:ShapeURI a sh:PropertyShape ;
  sh:path ex:pathURI ;
  sh:minCount 1 ;
  sh:maxCount 1 ;
  sh:pattern "^[a-zA-Z]+$" .
Martin G. Skjæveland
@m.g.skjaeveland_gitlab

Hi @veleda. No, this is not supported. This would require an instance to return a value and behave like a function. Instances are more like predicates (in the logical sense) and represent a statement (possibly complex statement of several triples).

A possibility is to create a template that contains all or a selection of the predicates that are relevant for sh:PropertyShape, possibly using optional parameters to allow for more variations of input:

o-sh:PropertyShape[ ?shape, ?path, ??min, ??max, ??pattern ]

Perhaps a good starting point could be the diagram found here: https://www.w3.org/TR/shacl/#constraints-section ? However, it seems it is not complete as for instance sh:pattern is missing. How far from complete is this diagram?

A problem is of course that a template with too many parameters can be hard to use, and its instances hard to understand. Named parameters, which is a future feature, would be helpful here.

Veronika Heimsbakk
@veleda

Thank you for the reply, @m.g.skjaeveland_gitlab! I understand. It's not a big problem, instancing templates would require some kind of repeating pattern then. Too long template signatures will, as you say, be hard to use.

The diagram you refer to is an illustration of the key classes of SHACL (PropertyShape and NodeShape, and their superclass). It is not displaying the complete SHACL vocabulary, but a subset of constraints for the sake of example. The definitions of the SHACL Core Constraint components can be found under this section https://www.w3.org/TR/shacl/#core-components . As I mentioned, I've completed OTTR templates (in the syntax of stOTTR) for all constraints described in SHACL Core. Once I've added non-validating features in SHACL and SHACL SPARQL, I'll upload my collection of templates. :)

Ghost
@ghost~5f107a59d73408ce4fe9c26d
Hi everybody , it's the functionality to produce a query from a template considered? That would be really powerfull to get template instances from a knowledge graph removing the need for SPARQL but declaring the data model. Use case is for linked data web application. E.g. declaring UserInstance template . Through an API on top of lutra you can do. fetchAllUsers() etc..
Martin G. Skjæveland
@m.g.skjaeveland_gitlab
Hi @Christian-Nja. Yes, this is functionality we will support. The translation from a template to a SPARQL query is straightforward for the simple cases, but needs some careful thinking and specification for the more "advanced" features such as list expanders and optional. Therefore complete implementation will probably take some time.
Veronika Heimsbakk
@veleda
Hi! I'm getting this stack trace I can't decipher when serializing excel using tabottr. I've pasted the stack trace here; https://pastebin.com/ds0NbZRu Is it something at your place or my place that is the origin for this error you think?
Martin G. Skjæveland
@m.g.skjaeveland_gitlab
The error seems to be
org.apache.poi.ss.formula.FormulaParseException: Parse error near char 31 '[' in specified formula 'IF(ISNA(VLOOKUP(F15,[1]!Tabell2[#All],2,FALSE))=TRUE, "Feil", VLOOKUP(F15,[1]!Tabell2[#All],2,FALSE))'. Expected ',' or ')'
which indicates that there is a problem with a formula in the spreadsheet. It could be a problem with the formula it self (e.g., syntax error), or it could be a problems with how apache poi handles the formula, for instance not all functions are supported, but that is not what is reported here. If it is a problem with poi, you could try to copy the computed value of the formula so that poi does not have to evaluate the formula to get the value.
Veronika Heimsbakk
@veleda
Yes, I did stumble across some functions that was not supported. Almost all fields of my spreadsheet has to be computed using messy Excel functions in order to meet the tabOTTR-syntax. As the input is taken from a spreadsheet authored by my client. I'll try copy all fields over to a new spreadsheet and see if that helps. Thank you, Martin!
Veronika Heimsbakk
@veleda
Good morning! Is it possible to use ottr:none for any empty cell in tabOTTR? I've populated every empty cell with ottr:none, but I get "ottr:none" as literal output after serialization for text values.
Martin G. Skjæveland
@m.g.skjaeveland_gitlab
If I understand you correctly: Empty cells in tabOTTR are (already) interpreted as ottr:none: "the empty string (after trimming) represent the special no-value value ottr:none. This value has no type." https://spec.ottr.xyz/tabOTTR/0.4/#2.3.2_Value_formatting
Veronika Heimsbakk
@veleda
But if a row contains one empty cell, none of the other cells that contain information will be serialized? Every row in my excel-document contains one or more empty values. If I leave them empty, I get a result of 0 triples. If I fill in none or ottr:none, the result will be "none" or "ottr:none" as literal values for the respective triples. I think I'm missing something.
Martin G. Skjæveland
@m.g.skjaeveland_gitlab
It sounds as though you have not marked the parameters of your template as optional. If the value ottr:none is given to a non-optional parameter, then the instance is removed.
if the type of the column is set to "text", then it is interpreted as text, that's why also ottr:none and none become literals.
if you set the column type to "auto", then the values get their type according to the format of each value, see the spec for details.
Wolfgang Fahl
@WolfgangFahl
Just found https://www.semantic-mediawiki.org/wiki/SMWCon_Fall_2021/OTTR_(Reasonable_Ontology_Templates)_Extension and the links https://github.com/RobFlo98/OttrParserExtension - this links to FloSchroeder - is he/she active in this community so that i could ask questions here?
4 replies
On another account - i wonder whether my existing http://wiki.bitplan.com/index.php/SiDIF models could be translated to OTTR. I created https://pypi.org/project/py-sidif/ for a start to get closer to more standardized triple notations. The main goal of SiDIF was to make sure data, model and metamodel may be put into a single file. Does OTTR have comparable goals?
3 replies
Caitlin2694
@Caitlin2694
Hi there,
I have a question that I've come across when using OTTR. I am wondering if it is possible to have an object property and give it "object property characteristics" in OTTR (for example, to make an object property functional or transitive). I have had a look through the documentation and cannot find reference to property characteristics. If this is possible, could someone please point me to the correct place to see how to do this?
Thanks so much for your help.
Martin G. Skjæveland
@m.g.skjaeveland_gitlab

Hi @Caitlin2694 , I would state this by using the Type template (http://tpl.ottr.xyz/rdf/0.1/Type), e.g.,

o-rdf:Type(?ob, owl:FunctionalProperty)

If you need multiple characteristics for the same property, you will need to make many instances of the Type template.

One could argue that we should have dedicated templates for this, e.g., something like:

o-owl-ax:FunctionalProperty[?ob] :: { o-rdf:Type(?ob, owl:FunctionalProperty) } .

as this would give us fuller coverage of the OWL spec (https://www.w3.org/TR/owl2-mapping-to-rdf) -- which is a good argument, I think. We should aim for complete coverage of this OWL spec.

Caitlin2694
@Caitlin2694
That's great. Thank you!
cardiganlover
@cardiganlover
Hello all. Has anyone successfully used pyOTTR, the Python library for using OTTR? I opened an issue in the pyOTTR GitHub, and I'd appreciate any advice people can provide here. Thank you!
Martin G. Skjæveland
@m.g.skjaeveland_gitlab
Hi @cardiganlover , I am part of the OTTR development team. pyOTTR is not in our portfolio and is created independently from us, so I don't know its status, but hopefully others can help you. Let us know what you find out.
cardiganlover
@cardiganlover
@m.g.skjaeveland_gitlab Thank you, Martin. I'll let you know what I hear.
Martin G. Skjæveland
@m.g.skjaeveland_gitlab
This following was just sent to our announcement mailing list: https://groups.google.com/g/ottr-announcements. Please join the list if you wish to receive these emails.

Hi all,

here are the latest news and updates from the OTTR project.

** As of yesterday, new releases of Lutra will be issued bi-monthly.
The release will be followed by an announcement email like this that
will include the latest news.

** Lutra 0.6.14 was released yesterday. The release is found on
GitLab, the jar artefacts are released on Maven central, and the
(incomplete) javadocs are available through javadoc.io. The Lutra CLI
executable is also available directly from
http://ottr.xyz/downloads/lutra/. This information is found on the
GitLab README file:
https://gitlab.com/ottr/lutra/lutra#downloads

Changelog:
https://gitlab.com/ottr/lutra/lutra/-/blob/develop/CHANGELOG.md

** We have labelled issues where where we in particular think your
help is needed and possible:
https://gitlab.com/groups/ottr/-/issues/?label_name%5B%5D=wanted%3A%20help
Please have a look and help us out.

** Our GitLab project on http://gitlab.com/ottr was recently accepted
for GitLab's open source programme:
https://about.gitlab.com/solutions/open-source/ This means we can
continue to use most of GitLab's services for free.

** Conferences and Workshops. We will, or have been, present at the
following conferences and workshops to present our work:

Martin

Veronika Heimsbakk
@veleda
Hi guys! Is ottr.xyz down? I only get connection time out this morning.
Martin G. Skjæveland
@m.g.skjaeveland_gitlab
It works for me. I have experienced problems which I think are due to the fact that .xyz domains are banned by some. Does https://abc.xyz/ work?