Unable to load semantics from ontology

Bug #846248 reported by Jacky Alciné
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
The Wintermute Project
Status tracked in Trunk
Trunk
Triaged
High
Unassigned

Bug Description

Wintermute requires that information, more technically known as resources, a subset of a RDF statement, are required in order to form properly machine understandable statement. An ontology provides the logic of knowledge for natural language processing.

We need Soprano to simply execute a SPARQL query.

Changed in wintermute:
assignee: nobody → Wintermute Developers (wintermute-devel)
importance: Undecided → High
milestone: none → 0.01a
tags: added: development ontology wntrdata
Revision history for this message
Jacky Alciné (jackyalcine) wrote :

I've opened up an issue on GitHub so we have the final development information there.

Revision history for this message
Jacky Alciné (jackyalcine) wrote :

https://github.com/wntr/data/issues/3 is the location of the final issue result on GitHub.

Revision history for this message
Jonathan Marsden (jmarsden) wrote :

Using two issue tracking systems at once is unhelpful, I suggest the team pick one, and stick to it.

In Soprano, based on my very limited understanding, there is a class designed specifically for connecting Soprano to any SPARQL query engine over HTTP. It is called Soprano::Client::SparqlModel and is documented at http://soprano.sourceforge.net/apidox/stable/classSoprano_1_1Client_1_1SparqlModel.html

So... where is the actual issue here for wintermute? As currently stated in the Bug Description above, this issue sounds a bit like "we need our program to do what it is supposed to do".

OK... so... go ahead and code, so it does that :) Set up your SPARQL query backend of choice (Rasqual? Joseki? Openlink Virtuoso Open Source? Other?), and write a bit of glue code to point Soprano::Client::SparqlModel at it. Job done. I think?? Am I over-simplifying here? Possibly :)

What the specific problem is, that is preventing your team from coding something like that, to let your application execute SPARQL queries, is not mentioned at all in the description of this issue. Nor is what your team has already tried in this area, and why it didn't work out, and pointers to those earlier failed attempts...

More generally, doing apt-cache search sparql and investigating each package returned in depth could well lead to greater understanding of what parts of the task are already coded and available for wintermute to re-use, and what parts will need to be written by the wintermute team.

If your team has already done that kind of investigation, then please say so, and put a pointer to the results of that work here, so those reading the issue can easily see exactly what your team has already done as they work towards a solution.

For a few more SPARQL implementations, see http://www.w3.org/wiki/SparqlImplementations .

Revision history for this message
Jacky Alciné (jackyalcine) wrote :

The following is archived information from the now-closed issue on GitHub:

The obtainResource() method should do the following:

    * Form a SPARQL query as a QString
    * Determine if the said concept exists. If it doesn't; return a null concept.
    * Create a Resource object that stems from that said repository and the found concept.

I'm not sure how we deal with multiple concepts returned; I guess the return type could be changed toQList<Resource> but that's if it's necessary to do so.

Revision history for this message
Jacky Alciné (jackyalcine) wrote :

We've loaded a RDF model and attempted to load the information via SPARQL. The simple request to obtain a model for a Person object doesn't seem to obtain anything but meh.

Revision history for this message
Adrian Borucki (gentoolx) wrote :

Well, if we have to deal with possibly multiple concepts to be returned we, we have to use QList<Resource> or equivalent. We can't return either Resource or QList<Resource> and I think that splitting API to two functions isn't convenient for later use (unless we have *clear* definition when we want only one concept, when multiple).

Revision history for this message
Jacky Alciné (jackyalcine) wrote :

We'd only want one concept returned, the concept in question. But if it's possible for it to return a set of them, we might as well have it use QList<Resource> as a return argument. The callee would have to then determine which of the concepts is the concept it was looking for.

That being said, you've got the system reading a concept? o.O

Revision history for this message
Adrian Borucki (gentoolx) wrote :

Not yet... I am working on the Query class which will hold all query constructing facilities. Then, I will use it along with some new configuration methods to allow searching local and remote (thanks to SPARQL) ontologies for given concepts. I am considering the usage of QSet<QString> for returned concepts (if there are many).

Now question: is a concept single word like "Person" or can it be something more complex?
What do you think about having databases of trusted (remote) ontologies that Wintermute can use, possibly adding new ones in the future?

summary: - Unable to load semantics from Ontology
+ Unable to load semantics from ontology
Revision history for this message
Jacky Alciné (jackyalcine) wrote :

The concept "Person" would be this in raw RDF/OWL (on line 13,400) :

<owl:Class rdf:ID="Person">
    <rdfs:subClassOf rdf:resource="#Agent-NonArtifact"/>
    <rdfs:subClassOf rdf:resource="#AgentiveIntelligentObject"/>
    <rdfs:subClassOf rdf:resource="#Hominid"/>
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
    <rdf:type rdf:resource="#PersonType"/>
    <isaSynonymOf rdf:resource="#HumanBeing"/>
    <isaSynonymOf rdf:resource="#Human"/>
   <ldoce>person</ldoce>
   <wordnet>person</wordnet>
   <wnsense>person1n</wnsense>
   <wordnet>human</wordnet>
   <wnsense>human1n</wnsense>
   <wordnet>human being</wordnet>
   <wnsense>human being1n</wnsense>
   <ldoce>soul</ldoce>
   <wordnet>soul</wordnet>
   <wnsense>soul2n</wnsense>
   <hasSingularForm>person</hasSingularForm>
   <hasPluralForm>people</hasPluralForm>
  </owl:Class>

So, no, the Person concept should be one complex concept. This concept statement should be handled by the Resource class under the Ontology namespace. That class managing queries should be under that namespace as well. Also, that set should produce an object that allows you to query properties in an abstract manner, regardless of the source of information (and hopefully change said information). We might need to implement a Concept class that handles this work, I'll write the outlining of it and upload that to my branch.

Revision history for this message
Jacky Alciné (jackyalcine) wrote :

As a matter of fact, the Resource class is meant to wrap the resulting Soprano::Node object returned, so instead of a QSet<QString> of objects, it'd be a QSet<Resource*>. The Resource class merely handles access of the Soprano::Node in a manner that allows us to not only resist breaking ABI, but also permitting the avoiding of repeating tedious instructions.

Revision history for this message
Jacky Alciné (jackyalcine) wrote :

He got this ;)

Revision history for this message
Adrian Borucki (gentoolx) wrote :

Okay, I implemented some initial query performing. Do you have some method to test if this works correctly?

Revision history for this message
Jacky Alciné (jackyalcine) wrote : Re: [Bug 846248] Re: Unable to load semantics from ontology

Hmm, I could try, but I'd have to do a bit of changes to local code.
I'd have to add a few semantic connections and then allow the Data API
to call upon the existence of a concept and return if possible.

When I make the D-Bus adaptor + interface for it, I'll bump this bug.

On 2011-12-02, Adrian Borucki <email address hidden> wrote:
> Okay, I implemented some initial query performing. Do you have some
> method to test if this works correctly?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/846248
>
> Title:
> Unable to load semantics from ontology
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/wintermute/+bug/846248/+subscriptions
>

--
Jacky Alcine
Blog <http://jackyalcine.co.cc/> | Launchpad<https://launchpad.net/~jackyalcine>

Revision history for this message
Jacky Alciné (jackyalcine) wrote : Re: [Wintermute-devel] [Bug 846248] Re: Unable to load semantics from ontology

Can you push your changes with the code on your personal repo on GitHub (if
you haven't already)?

On Sat, Dec 3, 2011 at 10:41 PM, Jacky Alciné <email address hidden> wrote:

> Hmm, I could try, but I'd have to do a bit of changes to local code.
> I'd have to add a few semantic connections and then allow the Data API
> to call upon the existence of a concept and return if possible.
>
> When I make the D-Bus adaptor + interface for it, I'll bump this bug.
>
> On 2011-12-02, Adrian Borucki <email address hidden> wrote:
> > Okay, I implemented some initial query performing. Do you have some
> > method to test if this works correctly?
> >
> > --
> > You received this bug notification because you are subscribed to the bug
> > report.
> > https://bugs.launchpad.net/bugs/846248
> >
> > Title:
> > Unable to load semantics from ontology
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/wintermute/+bug/846248/+subscriptions
> >
>
>
> --
> Jacky Alcine
> Blog <http://jackyalcine.co.cc/> | Launchpad<
> https://launchpad.net/~jackyalcine>
>
> --
> You received this bug notification because you are a member of
> Wintermute Developers, which is subscribed to Wintermute.
> https://bugs.launchpad.net/bugs/846248
>
> Title:
> Unable to load semantics from ontology
>
> Status in Wintermute:
> In Progress
> Status in Wintermute trunk series:
> In Progress
>
> Bug description:
> Wintermute requires that information, more technically known as
> resources, a subset of a RDF statement, are required in order to form
> properly machine understandable statement. An ontology provides the
> logic of knowledge for natural language processing.
>
> We need Soprano to simply execute a SPARQL query.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/wintermute/+bug/846248/+subscriptions
>
> _______________________________________________
> Mailing list: https://launchpad.net/~wintermute-devel
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~wintermute-devel
> More help : https://help.launchpad.net/ListHelp
>

--
One Vision. One Purpose.
We are the Synthetic Intellect Institute
<email address hidden> :: http://www.thesii.org/ :: #sii on FreeNode

Jacky Alcine, *Head Developer of Wintermute*
http://jackyalcine.co.cc :: <email address hidden> ::
https://launchpad.net/~jackyalcine

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.