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

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?

Related

Does Protege API support user rules?

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

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!

what's the difference between QVTo and QVTr transformation?

I want to do a model to model transformation, from a model based on Java metamodel to a model based on C++ metamodel.
I did some research and I found that QVT allow a bidirectional transformation but there is two types of QVT and I don't understand the difference between them, who is the more suitable for my project QVTo or QVTr ?
The difference between the two is the nature of the languages, QVTr is declarative and QVTo is imperative. In this particular case, another important factor when taking your decision is current tool support. A mature and stable implementation of QVTo is part of the Eclipse Modeling Project. For QVTr current support is more limited. There is an ongoing development available as part of the Eclipse Modeling Project too.
In the mean time I would recommend you to consider alternatives as such as Epsilon, which does not only provide a transformation language (ETL) but also other languages to work with models. You can find more information about them here: Eclipse MMT Projects

Making ontology in Protege or by Jena API library in Eclipse(Java coding)

Is it also possible to build an ontology with Jena API for example by Java coding in Eclipse? if yes what is the difference between making an ontology in Protege with making an ontology by Jena API in Eclipse?I am really confused about differences as I am not good in java programming.
Lots of thanks
It depends on what you actually want to do. Are you trying to build a new ontology from scratch? Do you have an existing ontology that you want to extend by adding some data. Are you generating lots of triples using pre-existing classes and properties, based on some data you're already processing in Java?
Protege offers a GUI that allows you to create the ontology more quickly. It also gives you a graphical overview of the ontology in creation. It's sometimes hard to get the big picture even with all this help. It's a powerful tool for overall ontology authoring. Writing an entire ontology by scribbling Java code line-by line seems a gruelling task to me.
Writing plain Java code to create an onthology would be very difficult and inefficient. On top of the complexity of RDF itself, you'd need to understand the Jena API. IMO, it only makes sense if you have a well-defined ontology and you're really sure what kind of triples you want to add. In such case, using Java code to interface with some data source could save you a lot of time. Provided that you know Java itself to do it efficiently.
In your case, sticking with Protege seems the most reasonable option.
The answer is yes: it's perfectly possible to create a no ontology through the Jena API and Java code.
The difference between Protege and plain old Java code is the task you need to perform: if you need to inspect an ontology or create a few concepts manually, Protege allows you to do it fairly quickly without writing code first. If you need to execute some repetitive task, on a large number of entities, or carry out something else for which Protege does not cater, then you're better off writing Java code.
This is not different from a question like: is it better to use a text editor or write a Perl script to edit text? It very much depends on the exact task at hand. Both are possible.

Resources