Does Protege API support user rules? - jena

In Jena API, it says it supports:
"Generic rule reasoner: A rule based reasoner that supports user defined rules. Forward chaining, tabled backward chaining and hybrid execution strategies are supported."
Does Protege API have similar reasoner? The downside of Jena API is it doesn't support full OWL specification.

Protege uses OWLReasoner compliant reasoners, some of which support SWRL rules (e.g., HermiT and Pellet). However SWRL rules do not have the same expressive power as the rule based reasoner in the Jena library.
You might want to check out SWRL to see if these rules fit your needs: https://www.w3.org/Submission/SWRL/
There is an SWRLAPI project which might be relevant:
https://github.com/protegeproject/swrlapi

Related

How can I use ontologies and SWRL in a recommendation application?

I'm working on a new project for recommendations to illustrate the importance of the semantic web. So, I decided to use ontologies and SWRL rules.
But I have questions, does the ontology replace the role of the database (i.e. should I use only ontologies or should I use for example MySQL with ontology)?
And what is the role of SWRL in the project?

SWRL built-ins not working in Protege 5.2

I am trying to use the built-ins of SWRL in Protege 5.2 but they seem to not function. All my other rules (written without any built-in) are inferred and clearly visible when i start my reasoner (pellet).
I am not sure, whether or not i need to setup something within protege or any other way to use the built-in's. Even a simple example as follows is not working:
Person(?x) ^ hasAge(?x,?age)^ swrlb:greaterThan(?age, 17) -> Adult(?x)
I would appreciate any help. Thanks.
Some of the reasoners don't have support for built-in types even though they support SWRL. Depending on the reasoner you may see a red triangle in the upper right-hand corner of Protege. Clicking on that will detail the error experienced.
Unfortunately I do not know of a reasoner which has support for built-in types for SWRL.
In this case there is a work-around. You can specify:
Class: Adult
hasAge some xsd:int[> "17"^^xsd:int]
If you're using Hermit reasoner, know that it does not support built-in types for SWRL but Pellet Reasoner does. You can install it as a plugin and then, after restarting your application, set Pellet as the reasoner before starting it.
More information here : OWL2 and SWRL Tutorial

Expert system VS OWL/RDF ontology

To build a rule-based expert system, what tools should be chosen? These two seems to be old tools for building expert system:
* Clip: http://www.clipsrules.net/
* Jess in Java
Are these three below also for the purpose of building expert system, as above two?
* Manchester OWL
* Protege OWL
* Jena API
It seems like the traditional 'expert system' has been outdated, and they are replaced by semantic web/ontology technologies. Can I say OWL and Jena API can achieve same things as a traditional expert system?
Short answer: no.
OWL is a knowledge representation language (and a set of applicable inference rules) - it is a W3C standard available here: https://www.w3.org/TR/owl2-overview/
Jena API supports RDF (which is another W3C standard, with strong relations to OWL) and OWL 1 (the current OWL version is 2); it also supports non standard extensions through a rule reasoner. It could be used to implement an expert system, but it is not, per se, a replacement for Jess or CLIPS.
Side note: Manchester OWL and Protege OWL don't really exist. Protege is a tool for creating OWL ontologies, supporting a number of OWL serialization formats (RDF/XML, OWL/XML, Turtle, Manchester syntax, Functional syntax, and more); Protege OWL is a plugin for an older Protege version - current Protege (5.1) has no 'OWL plugin' - OWL is integrated in the tool itself.
Manchester OWL is sometimes used to refer to Manchester syntax for OWL - this is nothing but a name for the format, and does not indicate any difference in expressivity.
It seems to me that "Expert Systems" of old have been absorbed into different applications/contexts - the actual mechanics (forward chaining, backward chaining, Rete Algorithm, etc) are just being repurposed.
A Semantic Reasoner is an expert system where the inference rules are expressed in terms of an ontology. Pellet is a semantic reasoner for Jena.
Another area is BPMN and business rules engines where, if we ignore the "workflow" component, we're left with a recognizable Expert System.
So you can use Jena as the basis for an Expert System - as per #Ignazio's answer, but it really depends on what you're trying to solve. A rich ontology has value in and of itself, you can do query-by-example (intersection), but the generation/curation costs of such a representation may be prohibitive.

How to link a domain ontology with WordNet synsets?

I have created a domain ontology for emotions. My task is to detect emotions conveyed in comments, posted on some forum. I want to populate each class of emotion (e.g., Joy) with its synonyms (e.g., Happy, Glad, etc.) using WordNet synsets, but I don't know how. I tried using IRI to create individuals but no luck so far. I'm using Protege 4.3.
Previously, a plugin called WordNetTab was available, but it is no longer supported (http://protege.cim3.net/cgi-bin/wiki.pl?WordNetTab).
Any suggestions?
As far as I know, there are no plugins that work with Protégé version 4.3 or greater. (I looked at the WordNet Princeton Related Projects page, Ontoling was a plugin someone created but it works with Protégé 3.2 only). You may have to resort to
1) Rolling back to a much older version of Protégé .
2) Using a Java (Or your preferred programming language) api for wordnet (like JAWS) along with a Java (again preference) based ontology framework (like OWL API or Apache Jena) to create these links.
3) Write a Protégé plugin for WordNet yourself!

How can I distinguish between Xtext, Xtend and similar Eclipse technologies?

What are the characteristics, differences and similarities of all these Eclipse-based technologies starting with X (Xtext, Xtend)? Are there any more to learn about?
Xtext is a textual modelling framework for development of programming languages and domain specific languages.
Xtend is a JVM language that "extends" Java, being fully interoperable with it while having a much nicer syntax. It is to Java like CoffeeScript is to JavaScript.
Xbase is a partial programming language implemented in Xtext and is meant to be embedded and extended within other programming languages and domain-specific languages (DSL) written in Xtext. Xtend is also based upon it.
Xcore is a convenient textual syntax for Ecore metamodels.
(Xpand is a language specialized on code generation based on EMF models, now deprecated in favor of Xtend.)
(Xpect is a unit- and integration-testing framework that stores test data in any kind of text files and is based on JUnit. It is implemented in Xtext and is a 3rd party project.)

Resources