我想使用Freebase Api来确定某个东西是否指某个实体(例如人,电视节目......)。例如"我如何认识你的母亲"指电视节目," lana del rey"是一个歌手。但是,如果某件事不是实体,我也想知道。
不幸的是Freebase搜索api对于那些不是明确实体的东西给了我很多误报,即使参数是exact = true和prefix = false:
例如:https://www.googleapis.com/freebase/v1/search?query=girl&exact=true
[
{
"mid": "/m/0ytdbkr",
"name": "Naked girl",
"notable": {
"name": "Film character",
"id": "/film/film_character"
},
"lang": "en",
"score": 5.222793
},
{
"mid": "/m/0y4k26c",
"name": "Sexy girl",
"notable": {
"name": "Film character",
"id": "/film/film_character"
},
"lang": "en",
"score": 4.754522
},
{
"mid": "/m/0yg73tt",
"name": "Call girl",
"notable": {
"name": "Film character",
"id": "/film/film_character"
},
"lang": "en",
"score": 4.567947
},
{
"mid": "/m/0w1sb51",
"name": "Gorgeous girl",
"notable": {
"name": "Film character",
"id": "/film/film_character"
},
"lang": "en",
"score": 4.526981
},
{
"mid": "/m/03p0tvg",
"id": "/user/girl",
"name": "girl",
"lang": "en",
"score": 4.465735
},
{
"mid": "/m/05p197",
"id": "/en/bad_girl_movies",
"name": "Bad girl movies",
"notable": {
"name": "Film genre",
"id": "/film/film_genre"
},
"lang": "en",
"score": 4.464571
},
....
]
}
答案 0 :(得分:0)
在这种情况下,什么是“精确”匹配?
如果你只是想要一个确切的名字&类型匹配,您可以使用MQLRead API而不是Freebase Search API来实现。如果你正在寻找不同的东西,你需要更具体地了解你所寻求的......