Search code examples
rdffreebase

Freebase /g/ vs /m/ namespace ids


I have tried reading the Freebase wiki etc but can't find an answer for this seemingly simple question. What is the difference between /g/ and /m/ namespace ids? (I have been looking through the Freebase RFD dump as well as the online access.)

For example "Musical Recording" has the /g/ id of 1yg94vctq (http://www.freebase.com/g/1yg94vctq) but there is also an /m/ id of 0kpv11 (http://www.freebase.com/m/0kpv11)

The former is an 'object' while the latter is a 'type'. What is the relationship between these two and what does /g/ signify?


Solution

  • You should consider all IDs as equivalent. They come in /en, /m, /g, /wikipedia/en, /wikipedia/en_id, and a large variety of other forms.

    In an ideal world, I suspect Google would rather not have the /g IDs exposed, but they tend to leak out. They represent entities in the internal Google Knowledge Graph which don't have corresponding external IDs/topics. The majority of them, in my experience, represent things from the /notable* range where Google has notable topics that they've created from a variety of other sources other than Freebase (e.g. search queries, other licensed databases, etc).

    The entities represented by /g identifiers are actually less than an /type/object, but are probably represented that way in the API/downloads because that's the closest equivalent to "nothing." They probably should just be considered naked identifiers with no type or other information other than their label/name. I'd store them though, they may magically resolve to something useful in the future (not a prediction, just a general philosophy that one should retain as much information as possible for reconciliation purposes).