Now returning types (Wikidata properties 31 and 279) as Q values. I assume you'd prefer those over their labels?
Ed, now generating an empty type array, so that your query should work; will fill soon-ish ;-)
On Fri, Jul 24, 2015 at 1:31 PM Ed Summers <
ehs@pobox.com> wrote:
> On Jul 24, 2015, at 5:37 AM, Magnus Manske <magnusmanske@googlemail.com> wrote:
>
> Early version:
> https://tools.wmflabs.org/wikidata-reconcile/
Wow, that was crazy fast Magnus :) I gave it a try in the latest OpenRefine on a very simple spreadsheet:
city
Paris
New York City
OpenRefine threw an exception (see below). I think OpenRefine is expecting the type key in each result. From the documentation [1] it looks like the value for the type key should be a array of types? I don’t know if it’s easy to get at that in your app. Speaking of which is the code available somewhere?
Awesome work!
//Ed
[1] https://github.com/OpenRefine/OpenRefine/wiki/Reconciliation-Service-API#query-response
//Ed
org.json.JSONException: JSONObject["type"] not found.
at org.json.JSONObject.get(JSONObject.java:406)
at org.json.JSONObject.getJSONArray(JSONObject.java:482)
at com.google.refine.commands.recon.GuessTypesOfColumnCommand.guessTypes(GuessTypesOfColumnCommand.java:216)
at com.google.refine.commands.recon.GuessTypesOfColumnCommand.doPost(GuessTypesOfColumnCommand.java:89)
at com.google.refine.RefineServlet.service(RefineServlet.java:177)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81)
at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:132)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata