[Developers] /wikipedia/en_id not giving results for redirected ids

Alec Flett alecf at metaweb.com
Thu Jul 24 18:11:51 UTC 2008


It really depends on what you're trying to do.

I think in general the previous advice has been based on people having  
Freebase IDs and mappping them back to Wikipedia, for which the en_id  
is appropriate.

If you want to go the other way, it sounds like names make more sense.

Alec

On Jul 24, 2008, at 2:30 AM, Shug Boabby wrote:

> But this advice contradicts what Freebase have previously advised...
> to use the WPID instead of the Wikipedia Name. Now you're saying that
> for future proofing, only the Name can be used? I'd strongly suggest
> that Freebase store the redirected WPIDs as well as the names.
>
> Also... what is the formula to change between the Wikipedia Names in
> the WEX files and the names in the Freebase API? Is it simply a case
> of changing spaces to underscores, or is there other magic? I'd also
> strongly suggest that this be made consistent in future dumps.
>
> 2008/7/24 Kurt Bollacker <kurt at metaweb.com>:
>>
>> I guess Brian beat me to that suggestion.
>>
>>
>> On Wed, Jul 23, 2008 at 11:01:33PM +0000, Kurt Bollacker wrote:
>>>
>>> On Wed, Jul 23, 2008 at 11:40:38PM +0100, Shug Boabby wrote:
>>>> Hi all,
>>>>
>>>> The following query will return the Freebase GUID for a Wikipedia
>>>> article with the given WPID (this corresponds to the "Spock" page).
>>>>
>>>> {
>>>>  "guid" : null,
>>>>  "key" : {
>>>>    "namespace" : "/wikipedia/en_id",
>>>>    "value" : "53571"
>>>>  }
>>>> }
>>>>
>>>> However, the following returns null (this ID corresponds to the
>>>> "Mr_Spock" page, which redirects to "Spock").
>>>>
>>>> {
>>>>  "guid" : null,
>>>>  "key" : {
>>>>    "namespace" : "/wikipedia/en_id",
>>>>    "value" : "3462975"
>>>>  }
>>>> }
>>>>
>>>> Why does this happen? How do I fix it?
>>>
>>> If you store "Mr_Spock" beside "3462975", you could use:
>>>
>>> {
>>>  "a:key" : {
>>>    "namespace" : "/wikipedia/en_id",
>>>    "value" : null
>>>  },
>>>  "guid" : null,
>>>  "key" : {
>>>    "namespace" : "/wikipedia/en",
>>>    "value" : "Mr_Spock"
>>>  }
>>> }
>>>
>>> Which returns:
>>>
>>> {
>>>  "a:key" : {
>>>    "namespace" : "/wikipedia/en_id",
>>>    "value" : "53571"
>>>  },
>>>  "guid" : "#9202a8c04000641f8000000000068479",
>>>  "key" : {
>>>    "namespace" : "/wikipedia/en",
>>>    "value" : "Mr_Spock"
>>>  }
>>> }
>>>
>>> You now get the numeric wpid of the actual article and the freebase
>>> GUID.
>>>
>>>
>>>                                                               
>>> Kurt :-)
>>>
>> _______________________________________________
>> Developers mailing list
>> Developers at freebase.com
>> http://lists.freebase.com/mailman/listinfo/developers
>>
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers



More information about the Developers mailing list