By Lukasz Lipski (blindluke)
Datum: Mittwoch März 13, 2013 16:15
Dauer: 20 Minuten
Language: English
Tags: generation text
It's amazing how simple generating sentences can be in Perl. If in doubt, check Inline::Spew (or the infamous Bone::Easy module). But how can this fact be used to our advantage? I'd like to present two examples where generating natural commentary serves a useful purpose, and, at the same time, does not require much effort on the developer's side.
Generating chess commentary from the numerical analysis provided by the Crafty chess engine will serve as the first example. The other one will involve generating status updates, for those moments when you have absolutely no new input, yet are required to provide an update to your users every 15 minutes.
Those examples deal with two basic use cases for using the presented approach- converting cryptic data to simple explanations, and providing variety to a message that would otherwise be the same every time.