Sunday, October 25, 2009

wkay - update

So where's WhoseKidAreYou? "Well, I'm working on it" is the short answer. I have recently reorganised the code in the user script, and I've been fiddling with Sindice, a semantic/linked data search engine. I'm fairly certain, however, that the first version out will work like this.

User script tries a range of XPath and DOM parsing options to obtain a byline and identify the element in the page that contains it; it then does various paper-specific things to clean up the data and convert it to wiki-style Name_Surname, and templates this into the query. The query is fired as an XmlHttpRequest in the background - because you can do cross-domain requests inside Greasemonkey - and the page renders anyway while waiting. When the queries to Sindice/DBpedia/Sourcewatch/Tobacco Archives happen, the results get templated in a chunk of HTML, if they contain hits, and then this is used to replace the byline.

Otherwise, a default element pointing you to a Wikipedia edit page will be inserted. That way, we get a triangular feedback going.

No comments:

kostenloser Counter