Export to GitHub

google-refine - issue #628

Patch: Update Freebase suggest widget


Posted on Oct 3, 2012 by Swift Ox

The current suggest widget being used in Refine uses deprecated and one-off hack APIs which will be offline soon. This patch updates refine to use a new version of the suggest widget that uses the new Freebase APIs.

The new APIs however require an API key so I am adding a default API key with a new option in the freebase dropdown to set a custom API key.

See http://wiki.freebase.com/wiki/Freebase_Suggest

Comment #1

Posted on Oct 3, 2012 by Swift Ox

This needs to be backward compatible with custom suggest services. I have deleted the patch for now, I'll upload a new one when I have that working.

Comment #2

Posted on Oct 8, 2012 by Swift Ox

Ok, here's the patch file. The suggest widget is now backwards compatible with custom suggest services that emulate the old suggest API.

Attachments

Comment #3

Posted on Oct 8, 2012 by Swift Bird

Thanks for the patch. Is this stock Freebase Suggest 4.0 as served from gstatic.com or has it been modified in some way?

It looks like we're currently running something 1.2.1 based which is pretty out of date considering how long 3.1 was available before 4.0.

Comment #4

Posted on Oct 8, 2012 by Swift Ox

It is the stock suggest as served from the links below, no modifications whatsoever. All the customization is done in custom-suggest.js

https://www.gstatic.com/freebase/suggest/4_0/suggest.min.css https://www.gstatic.com/freebase/suggest/4_0/suggest.min.js

Comment #5

Posted on Oct 12, 2012 by Swift Bird

(No comment was entered for this change.)

Comment #6

Posted on Oct 12, 2012 by Swift Bird

It appears that the new version of the Suggest widget no longer returns Freebase object types for matches which we're currently referencing.

http://code.google.com/p/google-refine/source/browse/trunk/main/webapp/modules/core/scripts/views/data-table/cell-ui.js#333

I'll need to dig further to see if we actually use this information.

Has this patch been deployed internally at Google?

Comment #7

Posted on Oct 12, 2012 by Swift Bird

Fixed in r2575. Thanks for the patch!

The last remaining problem was an incompatible change in the returned data from Suggest. They changed "n:type" to "notable" (and "r:score" to "score", but we don't use that).

Comment #8

Posted on Oct 12, 2012 by Swift Bird

(No comment was entered for this change.)

Comment #9

Posted on Oct 12, 2012 by Swift Bird

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-Defect Priority-Medium Patch-Applied Milestone-2.6