DL Query Question (OWA issue)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

DL Query Question (OWA issue)

Michael DeBellis-2
I'm working on an ontology that represents SWRL rules (discovered via Machine Learning) that find possible fake Twitter accounts (and makes them instances of the class FakeAccount). We have the rules figured out but I'm trying to answer the question "what is the benefit of using an ontology rather than Matlab or Python?". 

One thing that occurred to me is we could do a DL query based on the owners of all instances of FakeAccount. I.e., if an Agent owns a FakeAccount then another Account they own may be worthy of scrutiny even if it doesn't match the rules discovered by the ML algorithm. So I have the following query: 

Account and isAccountFor some (Agent and hasAccount some FakeAccount) 

Which works but also returns all the FakeAccount instances. So then I tried the following (which I didn't think would work but wanted to make sure):

Account and isAccountFor some (Agent and hasAccount some FakeAccount) and not FakeAccount

Of course this doesn't work because of the Open World Assumption. It returns no Individuals since due to the OWA the reasoner can't be certain that the instances of Account aren't really instances of FakeAccount (a subclass of Account). 

I know SPARQL could handle this but we are in a time crunch to get a paper done for a deadline and neither of us knows  SPARQL very well. Also, I just think the DL query is so much more elegant and intuitive it makes the case stronger. 

My guess is there is no way out of this but sometimes people who are more adept at DL than I am can figure out clever ways to express things that I'm missing so wanted to ask  just in case. Thanks for any ideas.

Michael


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: DL Query Question (OWA issue)

Dave McComb-2

The Sparql would be

 

 

SELECT ?suspectAccount

WHERE { ?fakeAccount a :FakeAccount  .

                ?fakeAccount :isAccountFor ?owner .

                ?suspectAccount :isAccountFor ?owner .

                FILTER (?suspectAccount != ?fakeAccount )

}

 

Sorry don’t know DL

 

Sent from Mail for Windows 10

 


From: protege-user <[hidden email]> on behalf of Michael DeBellis <[hidden email]>
Sent: Monday, July 8, 2019 3:20:31 PM
To: User support for WebProtege and Protege Desktop
Subject: [protege-user] DL Query Question (OWA issue)
 
I'm working on an ontology that represents SWRL rules (discovered via Machine Learning) that find possible fake Twitter accounts (and makes them instances of the class FakeAccount). We have the rules figured out but I'm trying to answer the question "what is the benefit of using an ontology rather than Matlab or Python?". 

One thing that occurred to me is we could do a DL query based on the owners of all instances of FakeAccount. I.e., if an Agent owns a FakeAccount then another Account they own may be worthy of scrutiny even if it doesn't match the rules discovered by the ML algorithm. So I have the following query: 

Account and isAccountFor some (Agent and hasAccount some FakeAccount) 

Which works but also returns all the FakeAccount instances. So then I tried the following (which I didn't think would work but wanted to make sure):

Account and isAccountFor some (Agent and hasAccount some FakeAccount) and not FakeAccount

Of course this doesn't work because of the Open World Assumption. It returns no Individuals since due to the OWA the reasoner can't be certain that the instances of Account aren't really instances of FakeAccount (a subclass of Account). 

I know SPARQL could handle this but we are in a time crunch to get a paper done for a deadline and neither of us knows  SPARQL very well. Also, I just think the DL query is so much more elegant and intuitive it makes the case stronger. 

My guess is there is no way out of this but sometimes people who are more adept at DL than I am can figure out clever ways to express things that I'm missing so wanted to ask  just in case. Thanks for any ideas.

Michael


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: DL Query Question (OWA issue)

Michael DeBellis-2
Dave, that's great, Thanks very much. Also, I just realized I think SQWRL can handle this as well and I'm very comfortable writing SWRL and SQWRL rules. Actually, I think I'll just use your SPARQL query. I know the SPARQL implementation in Protege isn't that powerful but I think it could handle that. Thanks a lot.   I'm still interested if someone has a DL answer but at least I have a fall back with your SPARQL query. 

Michael

On Mon, Jul 8, 2019 at 2:30 PM Dave McComb <[hidden email]> wrote:

The Sparql would be

 

 

SELECT ?suspectAccount

WHERE { ?fakeAccount a :FakeAccount  .

                ?fakeAccount :isAccountFor ?owner .

                ?suspectAccount :isAccountFor ?owner .

                FILTER (?suspectAccount != ?fakeAccount )

}

 

Sorry don’t know DL

 

Sent from Mail for Windows 10

 


From: protege-user <[hidden email]> on behalf of Michael DeBellis <[hidden email]>
Sent: Monday, July 8, 2019 3:20:31 PM
To: User support for WebProtege and Protege Desktop
Subject: [protege-user] DL Query Question (OWA issue)
 
I'm working on an ontology that represents SWRL rules (discovered via Machine Learning) that find possible fake Twitter accounts (and makes them instances of the class FakeAccount). We have the rules figured out but I'm trying to answer the question "what is the benefit of using an ontology rather than Matlab or Python?". 

One thing that occurred to me is we could do a DL query based on the owners of all instances of FakeAccount. I.e., if an Agent owns a FakeAccount then another Account they own may be worthy of scrutiny even if it doesn't match the rules discovered by the ML algorithm. So I have the following query: 

Account and isAccountFor some (Agent and hasAccount some FakeAccount) 

Which works but also returns all the FakeAccount instances. So then I tried the following (which I didn't think would work but wanted to make sure):

Account and isAccountFor some (Agent and hasAccount some FakeAccount) and not FakeAccount

Of course this doesn't work because of the Open World Assumption. It returns no Individuals since due to the OWA the reasoner can't be certain that the instances of Account aren't really instances of FakeAccount (a subclass of Account). 

I know SPARQL could handle this but we are in a time crunch to get a paper done for a deadline and neither of us knows  SPARQL very well. Also, I just think the DL query is so much more elegant and intuitive it makes the case stronger. 

My guess is there is no way out of this but sometimes people who are more adept at DL than I am can figure out clever ways to express things that I'm missing so wanted to ask  just in case. Thanks for any ideas.

Michael

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: DL Query Question (OWA issue)

Dave McComb-2

Yeah last time I used Sparql in protégé there wasn’t an option to include inferred triples (been a long while though) so not sure if you’ll get the answer you want, cuz it sounds like you want to run the query on the inferred graph (someone else on this list may know if this is now possible)

 

 

 

Sent from Mail for Windows 10

 


From: protege-user <[hidden email]> on behalf of Michael DeBellis <[hidden email]>
Sent: Monday, July 8, 2019 3:35:03 PM
To: User support for WebProtege and Protege Desktop
Subject: Re: [protege-user] DL Query Question (OWA issue)
 
Dave, that's great, Thanks very much. Also, I just realized I think SQWRL can handle this as well and I'm very comfortable writing SWRL and SQWRL rules. Actually, I think I'll just use your SPARQL query. I know the SPARQL implementation in Protege isn't that powerful but I think it could handle that. Thanks a lot.   I'm still interested if someone has a DL answer but at least I have a fall back with your SPARQL query. 

Michael

On Mon, Jul 8, 2019 at 2:30 PM Dave McComb <[hidden email]> wrote:

The Sparql would be

 

 

SELECT ?suspectAccount

WHERE { ?fakeAccount a :FakeAccount  .

                ?fakeAccount :isAccountFor ?owner .

                ?suspectAccount :isAccountFor ?owner .

                FILTER (?suspectAccount != ?fakeAccount )

}

 

Sorry don’t know DL

 

Sent from Mail for Windows 10

 


From: protege-user <[hidden email]> on behalf of Michael DeBellis <[hidden email]>
Sent: Monday, July 8, 2019 3:20:31 PM
To: User support for WebProtege and Protege Desktop
Subject: [protege-user] DL Query Question (OWA issue)
 
I'm working on an ontology that represents SWRL rules (discovered via Machine Learning) that find possible fake Twitter accounts (and makes them instances of the class FakeAccount). We have the rules figured out but I'm trying to answer the question "what is the benefit of using an ontology rather than Matlab or Python?". 

One thing that occurred to me is we could do a DL query based on the owners of all instances of FakeAccount. I.e., if an Agent owns a FakeAccount then another Account they own may be worthy of scrutiny even if it doesn't match the rules discovered by the ML algorithm. So I have the following query: 

Account and isAccountFor some (Agent and hasAccount some FakeAccount) 

Which works but also returns all the FakeAccount instances. So then I tried the following (which I didn't think would work but wanted to make sure):

Account and isAccountFor some (Agent and hasAccount some FakeAccount) and not FakeAccount

Of course this doesn't work because of the Open World Assumption. It returns no Individuals since due to the OWA the reasoner can't be certain that the instances of Account aren't really instances of FakeAccount (a subclass of Account). 

I know SPARQL could handle this but we are in a time crunch to get a paper done for a deadline and neither of us knows  SPARQL very well. Also, I just think the DL query is so much more elegant and intuitive it makes the case stronger. 

My guess is there is no way out of this but sometimes people who are more adept at DL than I am can figure out clever ways to express things that I'm missing so wanted to ask  just in case. Thanks for any ideas.

Michael

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: DL Query Question (OWA issue)

Csongor Nyulas
Administrator
The Snap SPARQL plug-in works with the inferred knowledge (you will need to start the reasoner to get any results).
It has auto-completion and syntax highlighting, which makes it much more user friendly than the default SPARQL Query plug-in. It does not support the full SPARQL 1.1 spec, yet, but it does most of it, most likely everything you may need.
You can add Snap SPARQL plug-in from under the Window -> Views -> Query views menu. If you don't see it listed there, you will need to install it first.

Csongor


On 7/8/19 2:37 PM, Dave McComb wrote:

Yeah last time I used Sparql in protégé there wasn’t an option to include inferred triples (been a long while though) so not sure if you’ll get the answer you want, cuz it sounds like you want to run the query on the inferred graph (someone else on this list may know if this is now possible)

 

 

 

Sent from Mail for Windows 10

 


From: protege-user [hidden email] on behalf of Michael DeBellis [hidden email]
Sent: Monday, July 8, 2019 3:35:03 PM
To: User support for WebProtege and Protege Desktop
Subject: Re: [protege-user] DL Query Question (OWA issue)
 
Dave, that's great, Thanks very much. Also, I just realized I think SQWRL can handle this as well and I'm very comfortable writing SWRL and SQWRL rules. Actually, I think I'll just use your SPARQL query. I know the SPARQL implementation in Protege isn't that powerful but I think it could handle that. Thanks a lot.   I'm still interested if someone has a DL answer but at least I have a fall back with your SPARQL query. 

Michael

On Mon, Jul 8, 2019 at 2:30 PM Dave McComb <[hidden email]> wrote:

The Sparql would be

 

 

SELECT ?suspectAccount

WHERE { ?fakeAccount a :FakeAccount  .

                ?fakeAccount :isAccountFor ?owner .

                ?suspectAccount :isAccountFor ?owner .

                FILTER (?suspectAccount != ?fakeAccount )

}

 

Sorry don’t know DL

 

Sent from Mail for Windows 10

 


From: protege-user <[hidden email]> on behalf of Michael DeBellis <[hidden email]>
Sent: Monday, July 8, 2019 3:20:31 PM
To: User support for WebProtege and Protege Desktop
Subject: [protege-user] DL Query Question (OWA issue)
 
I'm working on an ontology that represents SWRL rules (discovered via Machine Learning) that find possible fake Twitter accounts (and makes them instances of the class FakeAccount). We have the rules figured out but I'm trying to answer the question "what is the benefit of using an ontology rather than Matlab or Python?". 

One thing that occurred to me is we could do a DL query based on the owners of all instances of FakeAccount. I.e., if an Agent owns a FakeAccount then another Account they own may be worthy of scrutiny even if it doesn't match the rules discovered by the ML algorithm. So I have the following query: 

Account and isAccountFor some (Agent and hasAccount some FakeAccount) 

Which works but also returns all the FakeAccount instances. So then I tried the following (which I didn't think would work but wanted to make sure):

Account and isAccountFor some (Agent and hasAccount some FakeAccount) and not FakeAccount

Of course this doesn't work because of the Open World Assumption. It returns no Individuals since due to the OWA the reasoner can't be certain that the instances of Account aren't really instances of FakeAccount (a subclass of Account). 

I know SPARQL could handle this but we are in a time crunch to get a paper done for a deadline and neither of us knows  SPARQL very well. Also, I just think the DL query is so much more elegant and intuitive it makes the case stronger. 

My guess is there is no way out of this but sometimes people who are more adept at DL than I am can figure out clever ways to express things that I'm missing so wanted to ask  just in case. Thanks for any ideas.

Michael

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user