After a chat with Morten Frederiksen, I’ve improved my bot wh4 (previous blog entry) a bit so that you can ask it for pictures in more detail. So instead of asking just for a picture of a person by name (!pic Libby Miller), you can ask for pictures depicting several people at once (!pic Damian Steer, and Dan Brickley), or for pictures of a certain place (!pic [in|near] bristol), or for pictures of things (!pic [a|some] beer), and by date (!pic on 2004[-03-10]). Or you can combine all of these together e.g. (!pic sean, and norm, in bristol, a napkin, on 2003-10). It’s all case-insensitive.
You can try the bot on #foaf or #whwhwhwh on irc.freenode.net. You can add RDF to the underlying database using this form.
The syntax is a bit clunky – it needs all those commas to separate any single thing it’s looking for. It needs the keywords [and] for any additional person; [a|some] for each wordnet thing; [in|near] for a location; [on] for a date. A word with no keyword is assumed to be a person’s name.
The query is mapped directly to a squish RDF query which makes it nice and simple but means that there’s no clever handling of inverses like depiction etc, and of course it relies on data being present, in particular for location it uses my experimental properties (example file).
It asks the query of a remote interface to my database, returning RDF and then the bot asks the same query of the RDF it gets back, returning a maximum of 5 results. The code is here – it uses Paul Mutton’s Java PircBot code.
After all that I found it a little disappointing. It works for me to find my way to photos I know are present, but the hit rate is too low to make random queries.
As a byproduct I fixed up query by date in html. Quite cool to see what others are doing on the same day, e.g. 2004-03-03 – I was having fun at the tech plenary in France and someone else was at the dentist…
-
Recent Posts
- A node.js bot in XMPP
- Archiving a Mediawiki Installation
- Web [on|and|in|for|with|via|through] TV Workshop
- Some FOAF stats
- Displaying Guardian book reviews for quick buying on Amazon
- Generating specs from RDFS / OWL docs
- CharBotGreen for Identica
- Web Unperson
- iPhone working with PoGo
- Companies House XML and Rewired State
Archives
- January 2012
- December 2011
- October 2010
- September 2009
- June 2009
- May 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- January 2008
- February 2007
- May 2006
- April 2006
- March 2006
- February 2006
- November 2005
- October 2005
- September 2005
- July 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- April 2004
- March 2004
- February 2004
- December 2003
- October 2003
- September 2003
- August 2003
- July 2003
Hi Libby:
The link “squish RDF query” points to http://swordfish.rdfwed.org/rdfquery/ but the host is wrong. HTH.
d’oh! fixed. thanks Inkel.