pythonfreebase

regarding freebase library (how to use bol (film) title as id?)


I'm using freebase library to print the article. All is working fine. But I want to ask something from you. Following example working fine. Suppose I have title like this bol (film). Now I want to use this title like this "id": "/en/bol_(film)",. But This is not working. In wikipedia API, We can use this title as bol20%28%film29%. Can any one help me? thanks so much

  query = [{
          "id": "/en/barak_obama",
          "/common/topic/article": [{
            "id": None
          }],
          "/common/topic/image": [{
            "id": None
          }]
        }]

EDIT : I have read this for freebase site. But This is not working. For example, $0028 in a fully-qualified name represents a left parenthesis and $0029 represents a right parenthesis. (See Section 2.5.9 for the full list of legal characters in fully-qualified names.


Solution

  • There is no guarantee that there will be an id /en/foo for a given title "Foo". In order to find the correct id for your topic you have to either use the search service to get a list of candidate ids, or use MQL for exact phrase matches.

    Search https://www.googleapis.com/freebase/v1-sandbox/search?query=bol

    or

    http://tinyurl.com/3w9yvyz