[Developers] Get Freebase id from Wikipedia link

Vivek Puri vp at startupsquad.com
Tue May 20 21:07:39 UTC 2008


ah okay. Thanks for the update.

On Tue, May 20, 2008 at 5:05 PM, Brian Karlak <zenkat at metaweb.com> wrote:

>
> Hello Vivek --
>
> I believe you are doing the correct query to get the article blurb.  The
> problem is that the topic you are looking for is very new -- it was created
> in freebase just 2 days ago -- and there is a delay of a couple of days
> between a new wikipedia-derived topic being created in freebase and its
> blurb being available.
>
> If you try the same thing with an older topic (Star Wars), you'll get the
> correct blurb:
>
> http://www.freebase.com/api/trans/raw/guid/9202a8c04000641f8000000000034e81
>
> The topic for Taz should be available after 5pm PST today.  We're currently
> working on reducing the gap between topic creation and blurb availability.
>  Sorry for any confusion this may have caused.
>
> Brian
>
> On May 20, 2008, at 1:54 PM, Vivek Puri wrote:
>
> okay so playing around and i came up with the following query:
>
> "article" : {
>       "*" : []
>     },
>     "guid" : "#9202a8c04000641f80000000083b4ce6",
>     "type" : "/common/topic"
>
>
> So i try to get the blurb using the resulting article guid:
> http://www.freebase.com/api/trans/raw/guid/9202a8c04000641f80000000083b4cea
>
> I am getting an error: "sequence item 0: expected string, tuple found"
>
>
> What does that mean?
>
> Thanks
> Vivek
>
> On Tue, May 20, 2008 at 3:54 PM, Vivek Puri <vp at startupsquad.com> wrote:
>
>> And how do i get freebase topic from that(excuse me for asking the lame
>> question, but after not having made api calls in couple of months, i am
>> kinda rusty as to how to get around the system.)
>>
>> Vivek
>>
>>
>> On Tue, May 20, 2008 at 3:28 PM, Christopher R. Maden <crism at metaweb.com>
>> wrote:
>>
>>> Vivek Puri <vp at startupsquad.com> wrote:
>>> > While it is possible to determine the url of a wikipedia article for a
>>> given
>>> > Freebase topic id, how do i go about the other way round. Let's say i
>>> want
>>> > to find the topic id in freebase for the following wikipedia url:
>>> > http://en.wikipedia.org/wiki/Taz_(singer)<http://en.wikipedia.org/wiki/Taz_%28singer%29>
>>> <http://en.wikipedia.org/wiki/Taz_%28singer%29>.
>>> > What should be the api call to do that?
>>>
>>> You need to encode any non-ASCII characters as $hhhh where hhhh is the
>>> Unicode number for that character.  Then turn spaces into underscores.
>>>
>>> Taz_$0028singer$0029
>>>
>>> Then you can look for that key in the (in this case) English Wikipedia
>>> namespace:
>>>
>>> {"key":{"value":"Taz_$0028singer$0029",
>>> "namespace":"/wikipedia/en"}}
>>>
>>> or just make an ID out of it:
>>>
>>> {"id":"/wikipedia/en/Taz_$0028singer$0029"}
>>>
>>> ~Chris
>>> --
>>> Christopher R. Maden
>>> Data Architect
>>> Metaweb Technologies, Inc.
>>> <URL: http://www.metaweb.com/ >
>>> _______________________________________________
>>> Developers mailing list
>>> Developers at freebase.com
>>> http://lists.freebase.com/mailman/listinfo/developers
>>>
>>
>>
>>
>> --
>> Vivek Puri
>> GTalk: vp at vivekpuri.com
>>
>
>
>
> --
> Vivek Puri
> GTalk: vp at vivekpuri.com _______________________________________________
> 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
>
>


-- 
Vivek Puri
GTalk: vp at vivekpuri.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20080520/ad98a9a0/attachment.htm 


More information about the Developers mailing list