Hi,

For #2, a good standard approach is to first get the "class" (or "classes")
of the entity, using the property "instance of" (P31), then get the
"properties for this type" (P1963) values for that class or classes. In
many cases that will get you what are considered to be the
expected properties for that entity.

-Yaron

On Thu, Dec 16, 2021 at 5:06 PM Darnelle Melvin <darnelle.mel...@unlv.edu>
wrote:

> Hi Ricardo,
>
> To answer your questions,
>
> 1. I would use the following query to get the info you need.
>
> SELECT ?item ?itemLabel
> WHERE
> {
>  ?item wdt:P31 wd:Q6256 ;
>        rdfs:label "Portugal"@en .
>  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
> }
>
> 2. There are a few ways to SPARQL most used properties, but the size of
> the graph will definitely time out. You may want to start with the Wikidata
> Property Explorer <https://prop-explorer.toolforge.org/>.
>
> best regards,
> Darnelle
>
> [image: UNLV Logo] <http://unlv.edu/>
>
> Darnelle O. Melvin
>
> Special Collections and Archives Metadata Librarian
>
> Assistant Professor
> University Libraries
> University of Nevada, Las Vegas
>
> darnelle.mel...@unlv.edu
> Office: 702-895-2146 <17028952146>
>
> Twitter <https://twitter.com/metadataguy> • ORCID
> <http://orcid.org/0000-0002-4614-3504>
>
>
>
> On Thu, Dec 16, 2021 at 11:37 AM Federico Leva (Nemo) <nemow...@gmail.com>
> wrote:
>
>> Forwarding to the list a question sent to -owners.
>>
>> Federico
>>
>> -------- Messaggio Inoltrato --------
>> Oggetto: Using wikidata to extract aditional information about entities
>> Data: Thu, 16 Dec 2021 10:33:49 +0000
>> Mittente: Ricardo Pinto
>>
>> Good afternoon!
>>
>> My name is Ricardo Pinto, I am currently doing my thesis, and I am trying
>> to make calls to Wikidata. I am presently using SPARQLWrapper in python to
>> make the calls, but I am having trouble with some things that I hope you
>> can help me with.
>>
>> 1. How can I get the entity identifier? Given an entity (e.g. Portugal) I
>> need to get its identifier (e.g., Q45). Currently, I am doing this
>> by searching on google, but I need this to be systematic. Can you help me?
>> 2. While searching for entities related to another entity, I need to make
>> calls using properties. Is there a way to know what the most used
>> properties are? I need a systematic way to choose properties to search.
>> Can
>> you help me?
>>
>> Best regards,
>> Ricardo Pinto.
>> _______________________________________________
>> Wikidata mailing list -- wikidata@lists.wikimedia.org
>> To unsubscribe send an email to wikidata-le...@lists.wikimedia.org
>>
> _______________________________________________
> Wikidata mailing list -- wikidata@lists.wikimedia.org
> To unsubscribe send an email to wikidata-le...@lists.wikimedia.org
>


-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
_______________________________________________
Wikidata mailing list -- wikidata@lists.wikimedia.org
To unsubscribe send an email to wikidata-le...@lists.wikimedia.org

Reply via email to