[Developers] /wikipedia/en_id not giving results for redirected ids
Shug Boabby
shug.boabby at gmail.com
Thu Jul 24 09:30:09 UTC 2008
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
>
More information about the Developers
mailing list