Inference in virtuoso 7.x - ontology

I am reading that virtuoso 7.x does not support SWRL but is there an alternative way to achieve (in Virtuoso 7.x) the following:
Given:
<a> <relationship_1> <b>.
<b> <relationship_2> <c>.
Infer:
<a> <relationship_3> <c>.
Any sort of suggestion would be appreciated.
P.S: One way is to materialize these <a> <relationship_3> <c> . but am not interested in doing that.
Thanks

Related

Template loop in Wikipedia modules

I've imported Module:Documentation and Module:Arguments for custom mediawiki from wikipedia. Unfortunately, Lua indicates template loop inside them on also wiki-native pages like Template:Extension, these are not custom templates or pages. Would like a hint or direction to look into, maybe someone encountered the same problem.
The problem is in Template:Extension docs (probably, Template:Extension/doc). The Module:Documentation in both Russian and English Wikipedias is shorter than 464 lines, so your version is either obsolete or modified.

When I use the protege to perform SWRL reasoning, I am reminded that prefix name not registered

I am using protege to build an ontology and use the SWRL rules provided with the software for reasoning. When creating a new SWRL rule, I was reminded "protege prefix not registered for prefix name". Many thanks here, can someone tell me how to register the prefix name?
This happened to me too when I used the SWRLTab and the SQWRLTab.
I like to edit my turtle files with an IDE instead of using protege. I prefer this as I end up with a much cleaner and shorter file.
I still use Protege for a better visualization of my Ontology, to use reasoners, etc.
I personally use the Turtle format but this solution should work with all the other formats too, just make sure to adapt it to yours in the right way.
The problem for me was that I stored the Ontology IRI using only the #base declaration.
#base <MY_ONTOLOGY_IRI> .
I did some exploration and find out that Protege also saves a prefix as follow:
#prefix _: <MY_ONTOLOGY_IRI> .
This causes the SWRLTab and the SQWRLTab to expect to find the _: prefix. I think this can happen only if the Ontology is written by hand like in my case. Doesn't matter your situation, just make sure that the #prefix _: and the #base declaration have the same value and You should be fine.
⚠️ An additional note:
After adding the #prefix from my IDE, Protege asked to reload the Ontology with a pop-up. Reloading it was not enough for me. I had to restart Protege completely to make it work.

Jinja2 templates for latex - tutorials

I was wondering if someone can point me to the tutorials on how to create custom Jinja2 templates for LaTeX, so that I can use it in with nbconvert to convert Jupyter notebook into LaTeX?
Unfortunately that is highly undocumented. I would suggest asking on the mailing list or directly open an issue on GitHub (jupyter/nbconvert repo)
The normal template informations you find will work with one difference that you need to replace the template extension from .tpl to .tplxand replace the jinja delimiters: {% to ((* for blocks , {{ to ((( for variable interpolations and {# to ((= for comments + all the symetric closing markers. The reasoning is that latex uses { heavily and you want to avoid conflict.
Otherwise there is close to no difference between latex and non-latex templates.
I found this tutorial from the IPython/Jupyter Workshop at the NGCM Summer Academy (official jupyter github).

Graph libraries with dart and polymer

I was wondering if anyone is familiar with putting polymer dart and graphs together. I'm looking into using Google graph APIs, however I wanted to put some feelers out there if anyone was handling them different.
I think SVG + Polymer makes for a great foundation for charting libraries!
I experimented with SVG and data-binding a while back and was very happy with the results. My repository of experiments is here: https://github.com/justinfagnani/svg-binding
Custom elements would be a really nice way to allow for chart configuration. You could offer a default bar chart with a tag like <chrt-bar-chart data="{{ myData }}">, but allow incremental customization by supplying more attributes or child elements:
<chrt-chart>
<chrt-x-axis start="10" end="100"></chrt-x-axis>
<chrt-grid spacing="100"></chrt-grid>
<chrt-bars>
<chrt-series name="Series One" data="{{ myData }}"></chrt-series>
<chrt-series name="Series Two" data="{{ myOtherData }}"></chrt-series>
</chrt-bars>
</chrt-chart>
For a rough example.
Of course, you probably don't want to write your own configurable charting library, so if you check the bar chart example in my repo you can see how much work it is to roll you own chart from scratch. Being able to write SVG with data-bindings made it simple enough that you might consider doing it without a library.

In dart polymer how to define nested custom element?

I want to build a library for custom elements with Dart Polymer, the architecture looks like this:
<parent-custom-element attributes="xxxx">
<child-custom-element-0 attributes="yyyyy"> </child-custom-element-0>
<child-custom-element-1 attributes="zzzzzzzz"> </child-custom-element-1>
</parent-custom-element>
The requirement is that: the child-custom-element could access the DOM/variables/object of the parent-custom-element. For example, if the parent-custom-element has a canvas object, the child-custom-element could draw line, or circle on it.
Any ideas how to do it? Or any examples to guide me?
Thanks!
I wrote a blog post about nesting polymer elements:
http://www.roberthartung.de/nested-polymer-elements-and-data-binding-in-googles-dart/
This should help you to understand how to nest elements. Feel free to ask further questions!
Regards
Robert

Resources