0

I am new to Freebase. I am trying to extract all companies per country (The Head Quarter's country). The simplest approach I thought was to list them all and filter by country such as this test

[{
  "name": null,
  "type": "/organization/organization",
  "/location/location/containedby": "Japan",
  "limit": 4
}]  

The problem is that I get schools as well. It is not very clear unlike DBpedia that has a class called "Company", how one can find distinguish the companies in Freebase while there is no clear type for it? I thought the organization/organization domain will do but it is too general also there is Business domain.

user1848018
  • 1,086
  • 1
  • 14
  • 33

1 Answers1

1

Why not use /business/business_operation or /business/consumer_company or some other more appropriate type if /organization/organization is too broad?

A bigger issue with your query is that it is only going to find entities contained directly in Japan, not those contained in all locations contained by Japan (e.g. prefectures, cities, etc). You may want to investigate using the Freebase Search API instead of MQL since I think it will compute the closure for you (or do radius searches). Alternatively, you'll probably need to run a few variations of you query with different levels of location nesting.

Here are some example search queries/filters:

https://developers.google.com/freebase/v1/search-output restaurants near SF Ferry building - filter=(all type:restaurant (within radius:1000ft lon:-122.39 lat:37.7955))

https://developers.google.com/freebase/v1/search-cookbook Japanese volcanos - filter: (all category:volcano (any part_of:japan))

Tom Morris
  • 10,490
  • 32
  • 53
  • Good to know, thanks. Can you point me to some search api examples that will allow for radius search for such task. I already checked https://developers.google.com/freebase/v1/search-cookbook but did not find good examples for what i need to do – user1848018 Jun 26 '14 at 15:34
  • Freebase Search API documentation is terrible, even by Freebase standards. I've included a couple of examples of queries in my reply. – Tom Morris Jun 27 '14 at 03:13