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…

2 thoughts on “whwhwhwhwhwhwh

Comments are closed.