Re: [Wikidata-l] freebase id -> wikidata id

2015-05-17 Thread Tom Morris
Oops! Never mind!

On Sun, May 17, 2015 at 5:28 PM, Tom Morris  wrote:

>
> The three hits for your sample topic make me suspicious about the quality
> of the mapping though
>
> $ curl http://storage.googleapis.com/freebase-public/fb2w.nt.gz | zgrep
> 'm.04hcw'
>   <
> http://www.w3.org/2002/07/owl#sameAs> <
> http://www.wikidata.org/entity/Q9391> .
>  <
> http://www.w3.org/2002/07/owl#sameAs> <
> http://www.wikidata.org/entity/Q1579293> .
>  <
> http://www.w3.org/2002/07/owl#sameAs> <
> http://www.wikidata.org/entity/Q1347932> .
>

Those are prefix matches, of course.  A better grep is:

$ curl http://storage.googleapis.com/freebase-public/fb2w.nt.gz | zgrep
'm.04hcw>'

Tom
___
Wikidata-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] freebase id -> wikidata id

2015-05-17 Thread Tom Morris
Hi Ed. In addition to the API(s), there's a specific Freebase<->Wikidata
mapping dump which is a little old (18 months), but very compact and easy
to work with.  The identifiers are likely to be pretty stable, so if the
entities you are interested in have been around for a while, it might be
easier to work with.

   https://developers.google.com/freebase/data#freebase-wikidata-mappings

The three hits for your sample topic make me suspicious about the quality
of the mapping though

$ curl http://storage.googleapis.com/freebase-public/fb2w.nt.gz | zgrep
'm.04hcw'
  <
http://www.w3.org/2002/07/owl#sameAs> 
.
 <
http://www.w3.org/2002/07/owl#sameAs> <
http://www.wikidata.org/entity/Q1579293> .
 <
http://www.w3.org/2002/07/owl#sameAs> <
http://www.wikidata.org/entity/Q1347932> .

I don't know if this dump was used as the basis for the identifiers loaded
into Wikidata, but you might want to consider building in some safeguards
like double checking that names match -- whatever lookup scheme you decide
to use.

Tom

On Sun, May 17, 2015 at 10:23 AM, Ed Summers  wrote:

> Hi all,
>
> I was wondering if anyone had any advice for mapping a set of Freebase
> identifiers to WikiData identifiers. I’m looking to port over a few
> thousand entities in use in an application since Freebase is going to be
> shut off next month.
>
> My apologies if this is a rudimentary question. I took a quick look at the
> API [1] and didn’t see an obvious way of doing it. Or is the WikiData Query
> API [2] a better fit for this? I was able to figure out how to do a lookup
> based on the FreebaseID,
>
> https://wdq.wmflabs.org/api?q=string[646:'/m/04hcw']
>
> Any tips or pointers would be appreciated.
>
> //Ed
>
> [1] https://www.wikidata.org/w/api.php
> [2] https://wdq.wmflabs.org/api_documentation.html
>
> ___
> Wikidata-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikidata-l
>
>
___
Wikidata-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] freebase id -> wikidata id

2015-05-17 Thread Lydia Pintscher
On Sun, May 17, 2015 at 4:23 PM, Ed Summers  wrote:
> Hi all,
>
> I was wondering if anyone had any advice for mapping a set of Freebase 
> identifiers to WikiData identifiers. I’m looking to port over a few thousand 
> entities in use in an application since Freebase is going to be shut off next 
> month.
>
> My apologies if this is a rudimentary question. I took a quick look at the 
> API [1] and didn’t see an obvious way of doing it. Or is the WikiData Query 
> API [2] a better fit for this? I was able to figure out how to do a lookup 
> based on the FreebaseID,
>
> https://wdq.wmflabs.org/api?q=string[646:'/m/04hcw']
>
> Any tips or pointers would be appreciated.

To do this you want to either use Wikidata Query, which you already
found, or work on dumps. More about them at
https://www.wikidata.org/wiki/Wikidata:Data_access


Cheers
Lydia

-- 
Lydia Pintscher - http://about.me/lydia.pintscher
Product Manager for Wikidata

Wikimedia Deutschland e.V.
Tempelhofer Ufer 23-24
10963 Berlin
www.wikimedia.de

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.

Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg
unter der Nummer 23855 Nz. Als gemeinnützig anerkannt durch das
Finanzamt für Körperschaften I Berlin, Steuernummer 27/681/51985.

___
Wikidata-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-l