error in query

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

error in query

kumar rohit
Hello
What is the problem in this query?

select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia ;         ?person dbo:abstract ?abstract   }

The error is message is below

syntax error at '?abstract' before '}'

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

Re: error in query

Jim Balhoff-2
I think you should replace the semicolon with a period.

- Jim

> On Mar 12, 2016, at 3:10 PM, kumar rohit <[hidden email]> wrote:
>
> Hello
> What is the problem in this query?
>
> select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia ;         ?person dbo:abstract ?abstract   }
>
> The error is message is below
>
> syntax error at '?abstract' before '}'
> _______________________________________________
> 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: error in query

kumar rohit
Thank you Jim, it works now but I am surprised because some time it works using semi colon and in this case, it has given error

On Sat, Mar 12, 2016 at 8:27 PM, Jim Balhoff <[hidden email]> wrote:
I think you should replace the semicolon with a period.

- Jim

> On Mar 12, 2016, at 3:10 PM, kumar rohit <[hidden email]> wrote:
>
> Hello
> What is the problem in this query?
>
> select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia ;         ?person dbo:abstract ?abstract   }
>
> The error is message is below
>
> syntax error at '?abstract' before '}'
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: error in query

kumar rohit
When I run the first portion of the query (select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia), it gives me result. But when I run the whole query,(select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia .  ?person dbo:abstract ?abstract   } ), it gives me nothing i-e no result.



On Sat, Mar 12, 2016 at 9:17 PM, kumar rohit <[hidden email]> wrote:
Thank you Jim, it works now but I am surprised because some time it works using semi colon and in this case, it has given error

On Sat, Mar 12, 2016 at 8:27 PM, Jim Balhoff <[hidden email]> wrote:
I think you should replace the semicolon with a period.

- Jim

> On Mar 12, 2016, at 3:10 PM, kumar rohit <[hidden email]> wrote:
>
> Hello
> What is the problem in this query?
>
> select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia ;         ?person dbo:abstract ?abstract   }
>
> The error is message is below
>
> syntax error at '?abstract' before '}'
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: error in query

Csongor Nyulas
Administrator
In reply to this post by kumar rohit
You could use semicolon, but then you have to omit "?person" after the semicolon, because semicolon means that the subject of the next triple is the same as the previous triple. So with the semicolon, this is how your query would look like:

select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia ;         dbo:abstract ?abstract   }

Csongor

On 03/12/2016 01:17 PM, kumar rohit wrote:
Thank you Jim, it works now but I am surprised because some time it works using semi colon and in this case, it has given error

On Sat, Mar 12, 2016 at 8:27 PM, Jim Balhoff <[hidden email]> wrote:
I think you should replace the semicolon with a period.

- Jim

> On Mar 12, 2016, at 3:10 PM, kumar rohit <[hidden email]> wrote:
>
> Hello
> What is the problem in this query?
>
> select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia ;         ?person dbo:abstract ?abstract   }
>
> The error is message is below
>
> syntax error at '?abstract' before '}'
> _______________________________________________
> 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


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

Re: error in query

Csongor Nyulas
Administrator
In reply to this post by kumar rohit
This would make perfect sense if the individuals that have birth place North Nicosia (the ones returned by the first query) are not subject of any triple that have dbo:abstract as predicate (in other words, the people from North Nicosia don't have any abstract defined).

Can you find at least one person that has both dbo:birthPlace dbr:NorthNicosia and also some value for dbo:abstract?

Csongor


On 03/12/2016 01:28 PM, kumar rohit wrote:
When I run the first portion of the query (select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia), it gives me result. But when I run the whole query,(select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia .  ?person dbo:abstract ?abstract   } ), it gives me nothing i-e no result.



On Sat, Mar 12, 2016 at 9:17 PM, kumar rohit <[hidden email]> wrote:
Thank you Jim, it works now but I am surprised because some time it works using semi colon and in this case, it has given error

On Sat, Mar 12, 2016 at 8:27 PM, Jim Balhoff <[hidden email]> wrote:
I think you should replace the semicolon with a period.

- Jim

> On Mar 12, 2016, at 3:10 PM, kumar rohit <[hidden email]> wrote:
>
> Hello
> What is the problem in this query?
>
> select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia ;         ?person dbo:abstract ?abstract   }
>
> The error is message is below
>
> syntax error at '?abstract' before '}'
> _______________________________________________
> 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


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

Re: error in query

kumar rohit
Hello sir

The first query (?person dbo:birthPlace dbr:North_Nicosia) returns only one person i-e http://dbpedia.org/resource/Erden_Eruç which in turn have dbo:abstract property on dbpedia if you visit his page on dbpedia. 
And, I got the point of semi colon and period. If you have to continue with the same subject and you dont want to repeat the subject again and again, use semi colon.
In case of period, I think the subject/resource will change.

On Sun, Mar 13, 2016 at 11:10 PM, Csongor Nyulas <[hidden email]> wrote:
This would make perfect sense if the individuals that have birth place North Nicosia (the ones returned by the first query) are not subject of any triple that have dbo:abstract as predicate (in other words, the people from North Nicosia don't have any abstract defined).

Can you find at least one person that has both dbo:birthPlace dbr:NorthNicosia and also some value for dbo:abstract?

Csongor



On 03/12/2016 01:28 PM, kumar rohit wrote:
When I run the first portion of the query (select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia), it gives me result. But when I run the whole query,(select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia .  ?person dbo:abstract ?abstract   } ), it gives me nothing i-e no result.



On Sat, Mar 12, 2016 at 9:17 PM, kumar rohit <[hidden email]> wrote:
Thank you Jim, it works now but I am surprised because some time it works using semi colon and in this case, it has given error

On Sat, Mar 12, 2016 at 8:27 PM, Jim Balhoff <[hidden email][hidden email]> wrote:
I think you should replace the semicolon with a period.

- Jim

> On Mar 12, 2016, at 3:10 PM, kumar rohit <[hidden email]> wrote:
>
> Hello
> What is the problem in this query?
>
> select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia ;         ?person dbo:abstract ?abstract   }
>
> The error is message is below
>
> syntax error at '?abstract' before '}'
> _______________________________________________
> 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


_______________________________________________
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: error in query

Csongor Nyulas
Administrator
I can't help you debug this without having access to your ontology/triple store and set up, but I am sure that with a little bit of insistence, you will figure it out on your own.

Here are just a few things that crossed my mind:
1. Maybe your triple store/ontology does not contain everything that is on dbpedia (did you checked if your second query contains http://dbpedia.org/resource/Erden_Eruç ?
What do you get when you query:
select   ?abstract where { <http://dbpedia.org/resource/Erden_Eruç> dbo:abstract ?abstract   }

2. On dbpedia http://dbpedia.org/resource/Erden_Eruç 's birthPlace is not explicitly stated to be dbr:North_Nicosia, only dbr:Cyprus and "Nicosia, Cyprus, raised in Turkey". So maybe when you run the full query, containing both statement, you don't use the same reasoning or extra information that you have used to get the response to the first query

Csongor


On 03/14/2016 01:28 PM, kumar rohit wrote:
Hello sir

The first query (?person dbo:birthPlace dbr:North_Nicosia) returns only one person i-e http://dbpedia.org/resource/Erden_Eruç which in turn have dbo:abstract property on dbpedia if you visit his page on dbpedia. 
And, I got the point of semi colon and period. If you have to continue with the same subject and you dont want to repeat the subject again and again, use semi colon.
In case of period, I think the subject/resource will change.

On Sun, Mar 13, 2016 at 11:10 PM, Csongor Nyulas <[hidden email]> wrote:
This would make perfect sense if the individuals that have birth place North Nicosia (the ones returned by the first query) are not subject of any triple that have dbo:abstract as predicate (in other words, the people from North Nicosia don't have any abstract defined).

Can you find at least one person that has both dbo:birthPlace dbr:NorthNicosia and also some value for dbo:abstract?

Csongor



On 03/12/2016 01:28 PM, kumar rohit wrote:
When I run the first portion of the query (select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia), it gives me result. But when I run the whole query,(select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia .  ?person dbo:abstract ?abstract   } ), it gives me nothing i-e no result.



On Sat, Mar 12, 2016 at 9:17 PM, kumar rohit <[hidden email]> wrote:
Thank you Jim, it works now but I am surprised because some time it works using semi colon and in this case, it has given error

On Sat, Mar 12, 2016 at 8:27 PM, Jim Balhoff <[hidden email]> wrote:
I think you should replace the semicolon with a period.

- Jim

> On Mar 12, 2016, at 3:10 PM, kumar rohit <[hidden email]> wrote:
>
> Hello
> What is the problem in this query?
>
> select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia ;         ?person dbo:abstract ?abstract   }
>
> The error is message is below
>
> syntax error at '?abstract' before '}'
> _______________________________________________
> 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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: error in query

Lorenz Buehmann
Kumar, how do you load whole DBpedia into Protege? That a resource in DBpedia has the abstract shown on it's page does not mean that you have the data loaded into Protege

I can't help you debug this without having access to your ontology/triple store and set up, but I am sure that with a little bit of insistence, you will figure it out on your own.

Here are just a few things that crossed my mind:
1. Maybe your triple store/ontology does not contain everything that is on dbpedia (did you checked if your second query contains http://dbpedia.org/resource/Erden_Eruç ?
What do you get when you query:
select   ?abstract where { <http://dbpedia.org/resource/Erden_Eruç> dbo:abstract ?abstract   }

2. On dbpedia http://dbpedia.org/resource/Erden_Eruç 's birthPlace is not explicitly stated to be dbr:North_Nicosia, only dbr:Cyprus and "Nicosia, Cyprus, raised in Turkey". So maybe when you run the full query, containing both statement, you don't use the same reasoning or extra information that you have used to get the response to the first query

Csongor


On 03/14/2016 01:28 PM, kumar rohit wrote:
Hello sir

The first query (?person dbo:birthPlace dbr:North_Nicosia) returns only one person i-e http://dbpedia.org/resource/Erden_Eruç which in turn have dbo:abstract property on dbpedia if you visit his page on dbpedia. 
And, I got the point of semi colon and period. If you have to continue with the same subject and you dont want to repeat the subject again and again, use semi colon.
In case of period, I think the subject/resource will change.

On Sun, Mar 13, 2016 at 11:10 PM, Csongor Nyulas <[hidden email]> wrote:
This would make perfect sense if the individuals that have birth place North Nicosia (the ones returned by the first query) are not subject of any triple that have dbo:abstract as predicate (in other words, the people from North Nicosia don't have any abstract defined).

Can you find at least one person that has both dbo:birthPlace dbr:NorthNicosia and also some value for dbo:abstract?

Csongor



On 03/12/2016 01:28 PM, kumar rohit wrote:
When I run the first portion of the query (select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia), it gives me result. But when I run the whole query,(select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia .  ?person dbo:abstract ?abstract   } ), it gives me nothing i-e no result.



On Sat, Mar 12, 2016 at 9:17 PM, kumar rohit <[hidden email]> wrote:
Thank you Jim, it works now but I am surprised because some time it works using semi colon and in this case, it has given error

On Sat, Mar 12, 2016 at 8:27 PM, Jim Balhoff <[hidden email]> wrote:
I think you should replace the semicolon with a period.

- Jim

> On Mar 12, 2016, at 3:10 PM, kumar rohit <[hidden email]> wrote:
>
> Hello
> What is the problem in this query?
>
> select   ?person ?abstract where { ?person dbo:birthPlace dbr:North_Nicosia ;         ?person dbo:abstract ?abstract   }
>
> The error is message is below
>
> syntax error at '?abstract' before '}'
> _______________________________________________
> 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


_______________________________________________
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
-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

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