Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-26 Thread Rick Labs

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/2017 1:22 PM, Kingsley Idehen wrote:

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): r...@clbcm.com
Mailing address: 8 Laureldale Dr., Pittsford, NY 14534-3508

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


Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-25 Thread Navino Evans
On 24 February 2017 at 22:00, Rick Labs  wrote:

> Nav,
>
> YES!!! that's it! Your SPARQL works perfectly, exactly what I wanted.
>
> Thanks very much. Just had to learn how to get the CVS into Excel as
> UTF-8, not hard. Can finally see what objects people want immediately below
> "Organizations", worldwide. (yes, whats evolved is pretty darn "chaotic")
> Very much appreciated.
>
> Rick


Excellent!! Very happy to help. Best of luck cleaning up the chaos :)


-- 

*nav...@histropedia.com *

@NavinoEvans 

-

   www.histropedia.com

Twitter Facebo
ok
Google +

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


Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-24 Thread Kingsley Idehen
On 2/24/17 4:00 PM, Rick Labs wrote:
>
> Nav,
>
> YES!!! that's it! Your SPARQL works perfectly, exactly what I wanted.
>
> Thanks very much. Just had to learn how to get the CVS into Excel as
> UTF-8, not hard. Can finally see what objects people want immediately
> below "Organizations", worldwide. (yes, whats evolved is pretty darn
> "chaotic")
>
> Very much appreciated.
>
> Rick

An FYI, and happy to receive feedback about how to achieve the same
thing directly from Wikidata:

[1] http://tinyurl.com/gohu2eg -- SPARQL-FED from a Service that can
return a CSV doc URI
[2] http://tinyurl.com/zblqqf2 -- SPARQL Query Results in CSV format.

Getting the CSV into Google Spreadsheet boils down to the formula:
=importData("http://tinyurl.com/zblqqf2";)  or the use the raw URI if the
tinyURL trips up Google Spreadsheet.

curl -iLO http://tinyurl.com/zblqqf2  to make a local copy that you can
import into Excel using its CSV import. In the past, you used to be able
to consume a URI directly in Excel, but things have gotten strange of late.

Links:

[1]
https://www.linkedin.com/pulse/importing-data-google-spreadsheet-using-sparql-kingsley-uyi-idehen

[2]
http://kidehen.blogspot.com/2015/06/importing-data-into-microsoft-excel-via.html

[3]
http://kidehen.blogspot.com/2015/06/importing-data-into-google-spreadsheet.html

Kingsley

>  
> On 2/24/2017 7:25 AM, Navino Evans wrote:
>> Hi Rick,
>>
>> Is this what you're after? http://tinyurl.com/z7ru9yr
>> Once you run the query there is a download drop-down menu, just above
>> the query results on the right hand side of the screen - it has a
>> range of options including CSV.
>> Hope that helps!
>> Nav
>>
>>
>> On 24 February 2017 at 02:25, Rick Labs > > wrote:
>>
>> 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/2017 1:22 PM, Kingsley Idehen wrote:
>>> 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 lis

Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-24 Thread Rick Labs

Nav,

YES!!! that's it! Your SPARQL works perfectly, exactly what I wanted.

Thanks very much. Just had to learn how to get the CVS into Excel as 
UTF-8, not hard. Can finally see what objects people want immediately 
below "Organizations", worldwide. (yes, whats evolved is pretty darn 
"chaotic")


Very much appreciated.

Rick

On 2/24/2017 7:25 AM, Navino Evans wrote:

Hi Rick,

Is this what you're after? http://tinyurl.com/z7ru9yr
Once you run the query there is a download drop-down menu, just above 
the query results on the right hand side of the screen - it has a 
range of options including CSV.

Hope that helps!
Nav


On 24 February 2017 at 02:25, Rick Labs > wrote:


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/2017 1:22 PM, Kingsley Idehen wrote:

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


___ Wikidata mailing
list Wikidata@lists.wikimedia.org

https://lists.wikimedia.org/mailman/listinfo/wikidata
 


--
/nav...@histropedia.com /
@NavinoEvans 
-
www.histropedia.com 
Twitter  Facebo 
ok 
 Google + 



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


Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-24 Thread Navino Evans
Hi Rick,

Is this what you're after? http://tinyurl.com/z7ru9yr

Once you run the query there is a download drop-down menu, just above the
query results on the right hand side of the screen - it has a range of
options including CSV.

Hope that helps!

Nav




On 24 February 2017 at 02:25, Rick Labs  wrote:

> 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/2017 1:22 PM, Kingsley Idehen wrote:
>
> 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 
> listWikidata@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata
>
>
>
> ___
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
>


-- 

*nav...@histropedia.com *

@NavinoEvans 

-

   www.histropedia.com

Twitter Facebo
ok
Google +

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


Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-23 Thread Rick Labs

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/2017 1:22 PM, Kingsley Idehen wrote:

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


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


Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-23 Thread Thad Guidry
Ah!
That wasn't made clear on the wiki. Thanks Stas!

On Thu, Feb 23, 2017, 12:22 PM Kingsley Idehen 
wrote:

> 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
>
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-23 Thread Kingsley Idehen
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



smime.p7s
Description: S/MIME Cryptographic Signature
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-23 Thread Stas Malyshev
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.

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

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


Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-23 Thread Thad Guidry
In Freebase we had a parameter %lang=all

Does the SPARQL label service have something similar ?

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


Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-23 Thread Lucas Werkmeister
You can specify multiple languages for the label service:

# All subclasses of a class example
# here all subclasses of P279 Organization (Q43229)
SELECT ?item ?itemLabel ?itemDescription ?itemAltLabel
WHERE
{
  ?item wdt:P279 wd:Q43229.
  SERVICE wikibase:label { bd:serviceParam wikibase:language
"en,de,fr,ja,cn,ru,es,sv,pl,nl,sl,ca,it" }
}
ORDER BY ASC(LCASE(?itemLabel))

Link:
https://query.wikidata.org/#%23%20All%20subclasses%20of%20a%20class%20example%0A%23%20here%20all%20subclasses%20of%20P279%20Organization%20%28Q43229%29%0ASELECT%20%3Fitem%20%3FitemLabel%20%3FitemDescription%20%3FitemAltLabel%0AWHERE%0A%7B%0A%20%3Fitem%20wdt%3AP279%20wd%3AQ43229.%0A%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%2Cde%2Cfr%2Cja%2Ccn%2Cru%2Ces%2Csv%2Cpl%2Cnl%2Csl%2Cca%2Cit%22%20%7D%0A%7D%0AORDER%20BY%20ASC%28LCASE%28%3FitemLabel%29%29

I’ve also changed the query to sort the results case-insensitively.

(Note: the query seems to occasionally take a very long time for me, 180
seconds – I’m not sure if the many label languages cause the slowdown or
if it’s just my internet connection.)

Cheers,
Lucas


On 23.02.2017 02:57, Rick Labs wrote:
>
> I'm running into some major label gaps, as are others.
>
> My area of interest is the Company data project. I'm new to SPARQL and
> here is my working query:
>
> # All subclasses of a class example
> # here all subclasses of P279 Organization (Q43229)
> SELECT ?item ?itemLabel ?itemDescription ?itemAltLabel
> WHERE
> {
> ?item wdt:P279 wd:Q43229 .
> SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
> }
> ORDER BY ASC(?itemLabel)
>
> Background
>
> https://www.wikidata.orB/wiki/Wikidata:WikiProject_Companies seems
> most interested in https://www.wikidata.org/wiki/Q4830453 business
> enterprise. So I write the above SPARQL to see how "business
> enterprise" fits under its immediate parent - P279 Organization. I
> want to learn about all "brother/sister" level objects under
> "Organization."
>
> If you run the above you will see how many "Organization" children
> objects have no English label. This greatly impedes understanding what
> is considered a "business enterprise" and what is not. (Yes - this
> part of the ontology seems to need some serious tuning up too!)  When
> we go to build out a reasonable starter ontology under the "company
> data project" we want the structure sound prior to filling it in with
> a considerable volume of data.
>
> For example, a key goal is the company data needs to "add up" to
> economic data. Any entity that has a proprietor, partners, or any
> payroll counts in economic data. Government offices, schools, non
> profits, etc. all produce goods or services - all contribute to
> economic output (GDP).  So, much of the "company data  project" is
> directly relevant to entities that are more general than just
> "business entities".
>
> Is there a way I can run a SPARQL query that outputs the EN label if
> available (as above), and any other label in any other language
> (including a column for language code) if not? Ideally I'd like to
> have only one additional language reported if EN is not available, and
> I'd like to have it report according to my preference (German if
> available, French if not, then Japanese, Chinese on down the line. It
> would also be beneficial to have a column for the longer description,
> if available.
>
> For my analysis purposes now I'm happy to work with simple language
> translations done by machine. Even if they are slightly off they are
> probably good enough for my purposes of reviewing and trying to
> understand the standing ontology. I don't plan on inserting the
> translations back into WikiData myself, but might try to rally up
> humans with those specific language skills to double check the machine
> translations and once verified, insert the translated labels back into
> WikiData.
>
> I'm not at all familiar with other tools that might be available
> relevant to "the missing label challenge". Right now SPARQL, SERVICE
> wikibase:label, and Google Translate seem like the way to go. But, all
> ideas are most welcome.
>
> Thanks!
>
> Rick
>
>
> On 2/19/2017 11:00 AM, Romaine Wiki wrote:
>> Hi all,
>>
>> If you look in the recent changes, most items have labels in English
>> and those are shown in the recent changes and elsewhere (so we know
>> what the item is about without opening first). But not all items have
>> labels, and these items without English label are often items with
>> only a label in Chinese, Arabic, Cyrillic script, Hebrew, etc. This
>> forms a significant gap.
>>
>> Is there a way to easily make a transcription from one language to
>> another?
>> Or alternatively if there is a database that has such transcriptions?
>>
>>
>> Also the other way round might be helpful for users of Wikidata that
>> use/read it in Chinese, Arabic, Cyrillic script, Hebrew, etc.
>>
>> Thanks!
>>
>> Romaine
>>
>>
>> _

Re: [Wikidata] Label gaps on Wikidata - (SPARQL help needed. SERVICE wikibase:label)

2017-02-22 Thread Rick Labs

I'm running into some major label gaps, as are others.

My area of interest is the Company data project. I'm new to SPARQL and 
here is my working query:


# All subclasses of a class example
# here all subclasses of P279 Organization (Q43229)
SELECT ?item ?itemLabel ?itemDescription ?itemAltLabel
WHERE
{
?item wdt:P279 wd:Q43229 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ASC(?itemLabel)

Background

https://www.wikidata.orB/wiki/Wikidata:WikiProject_Companies seems most 
interested in https://www.wikidata.org/wiki/Q4830453 business 
enterprise. So I write the above SPARQL to see how "business enterprise" 
fits under its immediate parent - P279 Organization. I want to learn 
about all "brother/sister" level objects under "Organization."


If you run the above you will see how many "Organization" children 
objects have no English label. This greatly impedes understanding what 
is considered a "business enterprise" and what is not. (Yes - this part 
of the ontology seems to need some serious tuning up too!)  When we go 
to build out a reasonable starter ontology under the "company data 
project" we want the structure sound prior to filling it in with a 
considerable volume of data.


For example, a key goal is the company data needs to "add up" to 
economic data. Any entity that has a proprietor, partners, or any 
payroll counts in economic data. Government offices, schools, non 
profits, etc. all produce goods or services - all contribute to economic 
output (GDP).  So, much of the "company data  project" is directly 
relevant to entities that are more general than just "business entities".


Is there a way I can run a SPARQL query that outputs the EN label if 
available (as above), and any other label in any other language 
(including a column for language code) if not? Ideally I'd like to have 
only one additional language reported if EN is not available, and I'd 
like to have it report according to my preference (German if available, 
French if not, then Japanese, Chinese on down the line. It would also be 
beneficial to have a column for the longer description, if available.


For my analysis purposes now I'm happy to work with simple language 
translations done by machine. Even if they are slightly off they are 
probably good enough for my purposes of reviewing and trying to 
understand the standing ontology. I don't plan on inserting the 
translations back into WikiData myself, but might try to rally up humans 
with those specific language skills to double check the machine 
translations and once verified, insert the translated labels back into 
WikiData.


I'm not at all familiar with other tools that might be available 
relevant to "the missing label challenge". Right now SPARQL, SERVICE 
wikibase:label, and Google Translate seem like the way to go. But, all 
ideas are most welcome.


Thanks!

Rick


On 2/19/2017 11:00 AM, Romaine Wiki wrote:

Hi all,

If you look in the recent changes, most items have labels in English 
and those are shown in the recent changes and elsewhere (so we know 
what the item is about without opening first). But not all items have 
labels, and these items without English label are often items with 
only a label in Chinese, Arabic, Cyrillic script, Hebrew, etc. This 
forms a significant gap.


Is there a way to easily make a transcription from one language to 
another?

Or alternatively if there is a database that has such transcriptions?


Also the other way round might be helpful for users of Wikidata that 
use/read it in Chinese, Arabic, Cyrillic script, Hebrew, etc.


Thanks!

Romaine


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