[Developers] New user with MQL question
Kirrily Robert
kirrily at metaweb.com
Fri Apr 17 19:30:09 UTC 2009
On Apr 17, 2009, at 12:08 PM, Alex Genadinik wrote:
> I think the problem is that since I am planning to do this
> dynamically, I will not know that
> the URL is /en/the_police because I do not know the police is in
> entertainment. In fact,
> that is why I am using Freebase - to tell me what "The Police" is.
Alex,
The /en namespace doesn't refer to "entertainment", it refers to
"English" (the language). That is, the name of the band, in English,
is "The Police". Keys in Freebase don't relate to what field/subject/
area they are in, because many topics are in multiple areas. Take
Arnold Schwarzenegger for example (he's one of our best examples of
this). He's both a film actor and a politician. So his key is /en/
arnold_schwarzenegger (because that's his name in English), which
links to a specific entity: the guy who played Terminator and is
currently Governor of California. From there, we assign types to him:
Politician (aka /government/politician), Film (/film/film_actor), and
so on.
> So I can't really use the below query because of the /en/ - is there
> a more general query than the one below?
> {
> "id" : "/en/the_police",
> "type" : []
> }
So. The query above will get you a single topic: the one we identify
as /en/the_police, which just happens to be the band.
As mentioned elsewhere in the thread, if you want to hand us a string
like "The Police" and get back the most likely match for it,
regardless of what kind of thing it is, the search API is probably
your best bet. You don't have to hand it MQL, just a search string: http://freebase.com/api/service/search?query=the+police
K.
--
Kirrily Robert
Freebase Community Director
kirrily at metaweb.com
http://freebase.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20090417/3579baa1/attachment-0001.htm
More information about the Developers
mailing list