「Google Knowledge Graph Search API」の公開でEntity情報を活用可能に

17日に公開されたGoogle Knowledge Graph Search API
schema.orgのjson-ld形式で返ってくるわけですが、これ英語だけかと思ってたらクエリが日本語でもちゃんと返ってくる!とちょっと驚いたわけですが、日本語だと結構微妙な返り方をする(苦笑

完全な日本語側の対応にも期待です。

今回公開されたナレッジグラフのAPI、即ちGoogleがその事象について知っていることというのは、その情報をウェブサイト側にも利用出来るという意味以上に、その情報以上の情報をウェブサイトで提供することでGoodコンテンツからExcellentコンテンツへの昇華出来る可能性も示唆しています。

まずはサンプルで挙げられているクエリ「Taylor Swift」。

{
  "@context": {
    "@vocab": "http://schema.org/",
    "goog": "http://schema.googleapis.com/",
    "EntitySearchResult": "goog:EntitySearchResult",
    "detailedDescription": "goog:detailedDescription",
    "resultScore": "goog:resultScore",
    "kg": "http://g.co/kg"
  },
  "@type": "ItemList",
  "itemListElement": [
    {
      "@type": "EntitySearchResult",
      "result": {
        "@id": "kg:/m/0dl567",
        "name": "Taylor Swift",
        "@type": [
          "Thing",
          "Person"
        ],
        "description": "Singer-songwriter",
        "image": {
          "contentUrl": "http://t1.gstatic.com/images?q=tbn:ANd9GcQmVDAhjhWnN2OWys2ZMO3PGAhupp5tN2LwF_BJmiHgi19hf8Ku",
          "url": "https://en.wikipedia.org/wiki/Taylor_Swift",
          "license": "http://creativecommons.org/licenses/by-sa/2.0"
        },
        "detailedDescription": {
          "articleBody": "Taylor Alison Swift is an American singer-songwriter and actress. Raised in Wyomissing, Pennsylvania, she moved to Nashville, Tennessee, at the age of 14 to pursue a career in country music. ",
          "url": "http://en.wikipedia.org/wiki/Taylor_Swift",
          "license": "https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License"
        },
        "url": "http://taylorswift.com/"
      },
      "resultScore": 883.004883
    }
  ]
}

では次に、日本語でいくつか投げてみます。

■東京
{
  "@context": {
    "@vocab": "http://schema.org/",
    "goog": "http://schema.googleapis.com/",
    "EntitySearchResult": "goog:EntitySearchResult",
    "detailedDescription": "goog:detailedDescription",
    "resultScore": "goog:resultScore",
    "kg": "http://g.co/kg"
  },
  "@type": "ItemList",
  "itemListElement": [
    {
      "@type": "EntitySearchResult",
      "result": {
        "@id": "kg:/m/07dfk",
        "name": "Tokyo",
        "@type": [
          "AdministrativeArea",
          "Thing",
          "City",
          "Place"
        ],
        "description": "Capital of Japan",
        "image": {
          "contentUrl": "http://t0.gstatic.com/images?q=tbn:ANd9GcSJxjpK7r6C8grUlfZo1m8p4E_Br56BxQOLgnzO3LCA4C-98LrG",
          "url": "https://en.wikipedia.org/wiki/Transport_in_Greater_Tokyo",
          "license": "http://creativecommons.org/licenses/by-sa/3.0"
        },
        "detailedDescription": {
          "articleBody": "Tokyo, officially Tokyo Metropolis, is one of the 47 prefectures of Japan, and is both the capital and largest city of Japan. The Greater Tokyo Area is the most populous metropolitan area in the world. ",
          "url": "http://en.wikipedia.org/wiki/Tokyo",
          "license": "https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License"
        },
        "url": "http://www.metro.tokyo.jp/ENGLISH/"
      },
      "resultScore": 31.502502
    }
  ]
}

■メガネ・・・うーんビミョー過ぎるww
{
  "@context": {
    "@vocab": "http://schema.org/",
    "goog": "http://schema.googleapis.com/",
    "EntitySearchResult": "goog:EntitySearchResult",
    "detailedDescription": "goog:detailedDescription",
    "resultScore": "goog:resultScore",
    "kg": "http://g.co/kg"
  },
  "@type": "ItemList",
  "itemListElement": [
    {
      "@type": "EntitySearchResult",
      "result": {
        "@id": "kg:/m/01whc86",
        "name": "ギラギラメガネ団",
        "@type": [
          "Thing"
        ],
        "description": "Musical Artist"
      },
      "resultScore": 6.196605
    }
  ]
}

まだ日本のGoogleで表示されるようなナレッジグラフは返ってきませんが、現状でも利用できる分野は結構ありそう。(分野によりますが)
日本語で分かりますが、クエリが「メガネ」でも返ってくるnameは「ギラギラメガネ団」ということで部分一致で返ってきます。resultScoreで判断すれば良いような気もしますが、部分一致だと微妙に罠がありそう。。。

これは久しぶりに熱くなりました!
Share:

0 コメント:

コメントを投稿