使用FreeBase按联赛检索运动队

时间:2014-05-01 01:06:33

标签: json freebase mql

如此处所示http://tinyurl.com/kw2z65f我使用以下查询:

[{
  "type": "/sports/sports_team",
  "name": null,
  "limit": 300,
  "league": [{
    "type": "/sports/sports_league_participation",
    "name": null
  }]
}]

您会看到它会返回以下某些团队;但是,我想按联盟过滤它;我只想要NBA篮球队。

{
  "name": "Detroit Pistons",
  "league": [{
    "name": null,
    "type": "/sports/sports_league_participation"
  }],
  "type": "/sports/sports_team"
},
{
  "name": "Detroit Lions",
  "league": [
    {
      "name": null,
      "type": "/sports/sports_league_participation"
    },
    {
      "name": null,
      "type": "/sports/sports_league_participation"
    },
    {
      "name": null,
      "type": "/sports/sports_league_participation"
    }
  ],
  "type": "/sports/sports_team"
},
{
  "name": "Detroit Tigers",
  "league": [{
    "name": null,
    "type": "/sports/sports_league_participation"
  }],
  "type": "/sports/sports_team"
},
{
  "name": "Detroit Red Wings",
  "league": [{
    "name": null,
    "type": "/sports/sports_league_participation"
  }],
  "type": "/sports/sports_team"
},

注意:我已尝试"name":"National Basketball Association"等,但似乎没有任何效果。

如何通过联赛过滤FreeBase?

1 个答案:

答案 0 :(得分:1)

也许这有助于你

[{
  "type": "/sports/sports_team",
  "name": null,
  "limit": 300,
  "league": [{
    "type": "/sports/sports_league_participation",
    "/sports/sports_league_participation/league": [{
      "name": "National Basketball Association"
    }]
  }]
}]