Thanks Stas & especially Kingsley for the example:
# All subclasses of a class example
# here all subclasses of P279 Organization (Q43229)
SELECT ?item ?label ?itemDescription ?itemAltLabel
WHERE
{
?item wdt:P279 wd:Q43229;
rdfs:label ?label .
# SERVICE wikibase:label { bd:serviceParam wikibase:language
"en,de,fr,ja,cn,ru,es,sv,pl,nl,sl,ca,it" }
FILTER (LANG(?label) = "en")
}
ORDER BY ASC(LCASE(?itemLabel))
When I pull the FILTER line out of above I have almost what I
need - "the universe" of all sub classes of organization
(regardless of language). I want all subclasses in the output,
not just those available currently with an English label.
In the table output, is it possible to get: a column for language
code, and get the description to show up (if available for that
row)? That would be very helpful prior to my manual operations.
Can I easily export the results table to CSV or Excel? I can
filter and sort easily from there provided I have the hooks.
Thanks very much!
Rick
.
On 2/23/17 12:59 PM, Stas Malyshev wrote:
Hi! On 2/23/17 7:20 AM, Thad Guidry wrote:In Freebase we had a parameter %lang=all Does the SPARQL label service have something similar ?Not as such, but you don't need it if you want all the labels, just do: ?item rdfs:label ?label and you'd get all labels. No need to invoke service for that, the service is for when you have specific set of languages you're interested in.
Yep.
Example at: http://tinyurl.com/h2sbvhd
-- Regards, Kingsley Idehen Founder & CEO OpenLink Software (Home Page: http://www.openlinksw.com) Weblogs (Blogs): Legacy Blog: http://www.openlinksw.com/blog/~kidehen/ Blogspot Blog: http://kidehen.blogspot.com Medium Blog: https://medium.com/@kidehen Profile Pages: Pinterest: https://www.pinterest.com/kidehen/ Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen Twitter: https://twitter.com/kidehen Google+: https://plus.google.com/+KingsleyIdehen/about LinkedIn: http://www.linkedin.com/in/kidehen Web Identities (WebID): Personal: http://kingsley.idehen.net/dataspace/person/kidehen#this : http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this
_______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
-- Richard J. Labs, CFA, CPA CL&B Capital Management, LLC Phone: 315-637-0915 E-mail (preferred for efficiency): rick@clbcm.com Mailing address: 8 Laureldale Dr., Pittsford, NY 14534-3508