Re: [Wikidata-tech] query with incomplete result setecho "# DEALERDEALERS5" >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/DEALERSDEALER/

2017-10-03 Thread TheRealLasSantienaro92 Delacruz
'+'

On Oct 3, 2017 5:17 PM, "Stas Malyshev"  wrote:

Hi!

On 10/3/17 4:49 PM, Marco Neumann wrote:
> thank you Lucas and Stas, this works for me.
>
> so it would be fair to say that p:P39 by-passes the semantics of
> wdt:P39 with ranking*. for my own understanding why is a wdt property
> called a direct property**?

Because wdt: links directly to value, while p: links to a statement
(where ps: links to the value). But that's not the only property of wdt:
- another property that it links to "truthy" (current, best, etc.) value
- one that has best rank in this property (hence the "t" letter). This
may be what you want or not, depending on general semantics and your
particular case. For many properties, ranks do not play significant
role, since these properties do not change with time and do not have
temporally limited statements. So for these, using wdt: is always ok.
For some, like positions, offices, relationships between humans, etc.
the values can have temporal limits and if you want best/current one,
you use wdt:, otherwise you use p:/ps:. If you still want to account for
rank using p:/ps:, there are rank triples and wikibase:BestRank class
(see
https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Statement_
representation).


--
Stas Malyshev
smalys...@wikimedia.org

___
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
___
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech


Re: [Wikidata-tech] query with incomplete result set

2017-10-03 Thread Stas Malyshev
Hi!

On 10/3/17 4:49 PM, Marco Neumann wrote:
> thank you Lucas and Stas, this works for me.
> 
> so it would be fair to say that p:P39 by-passes the semantics of
> wdt:P39 with ranking*. for my own understanding why is a wdt property
> called a direct property**?

Because wdt: links directly to value, while p: links to a statement
(where ps: links to the value). But that's not the only property of wdt:
- another property that it links to "truthy" (current, best, etc.) value
- one that has best rank in this property (hence the "t" letter). This
may be what you want or not, depending on general semantics and your
particular case. For many properties, ranks do not play significant
role, since these properties do not change with time and do not have
temporally limited statements. So for these, using wdt: is always ok.
For some, like positions, offices, relationships between humans, etc.
the values can have temporal limits and if you want best/current one,
you use wdt:, otherwise you use p:/ps:. If you still want to account for
rank using p:/ps:, there are rank triples and wikibase:BestRank class
(see
https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Statement_representation).


-- 
Stas Malyshev
smalys...@wikimedia.org

___
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech


Re: [Wikidata-tech] query with incomplete result set

2017-10-03 Thread Marco Neumann
thank you Lucas and Stas, this works for me.

so it would be fair to say that p:P39 by-passes the semantics of
wdt:P39 with ranking*. for my own understanding why is a wdt property
called a direct property**?

* https://www.wikidata.org/wiki/Help:Ranking
**https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#Basics_-_Understanding_Prefixes

On Tue, Oct 3, 2017 at 7:24 PM, Stas Malyshev  wrote:
> Hi!
>
> On 10/3/17 4:02 PM, Marco Neumann wrote:
>> why doesn't the following query produce
>> http://www.wikidata.org/entity/Q17905 in the result set?
>
> The query asks for wdt:P39 wd:Q1939555, however current preferred value
> for P39 there is Q29576752. When the item has preferred value, only this
> value shows up in wdt. If you want all values, use something like:
>
> https://query.wikidata.org/#SELECT%20%3FMdB%20%3FMdBLabel%20WHERE%20%7B%0ASERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%3FMdB%20p%3AP39%20%3FxRefNode.%20%0A%3FxRefNode%20pq%3AP2937%20wd%3AQ30579723%3B%0A%20%20%20ps%3AP39%20wd%3AQ1939555.%0A%7D
>
> Or change "preferred" status on Q17905:P39.
>
> --
> Stas Malyshev
> smalys...@wikimedia.org



-- 


---
Marco Neumann
KONA

___
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech


Re: [Wikidata-tech] query with incomplete result set

2017-10-03 Thread Stas Malyshev
Hi!

On 10/3/17 4:02 PM, Marco Neumann wrote:
> why doesn't the following query produce
> http://www.wikidata.org/entity/Q17905 in the result set?

The query asks for wdt:P39 wd:Q1939555, however current preferred value
for P39 there is Q29576752. When the item has preferred value, only this
value shows up in wdt. If you want all values, use something like:

https://query.wikidata.org/#SELECT%20%3FMdB%20%3FMdBLabel%20WHERE%20%7B%0ASERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%3FMdB%20p%3AP39%20%3FxRefNode.%20%0A%3FxRefNode%20pq%3AP2937%20wd%3AQ30579723%3B%0A%20%20%20ps%3AP39%20wd%3AQ1939555.%0A%7D

Or change "preferred" status on Q17905:P39.

-- 
Stas Malyshev
smalys...@wikimedia.org

___
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech


[Wikidata-tech] query with incomplete result set

2017-10-03 Thread Marco Neumann
why doesn't the following query produce
http://www.wikidata.org/entity/Q17905 in the result set?

https://query.wikidata.org/#SELECT%20%3FMdB%20%3FMdBLabel%20WHERE%20%7B%0ASERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%3FMdB%20wdt%3AP39%20wd%3AQ1939555%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20p%3AP39%20%3FxRefNode.%20%0A%3FxRefNode%20pq%3AP2937%20wd%3AQ30579723.%0A%7D

Thx

-- 


---
Marco Neumann
KONA

___
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech