March 31, 2009

Who Says You Can't Swear in C++?

I currently have the pleasure of using Och's YASMET tool for maximum entropy model optimization. (Quick background primer: maximum entropy is really a simple concept - assume nothing about the data beyond what you're given. In slightly more technical terms, you want the most uniform distribution that fits the constraints.) Looking at the source code is akin to reading one too many JAPH snippets or sifting through Google's obfuscated JavaScript - it's an experience both awe-inspiring and twitch-inducing. Of course, it's GNU GPL'd, so anyone who can navigate the mess of two-letter variable names, magic numbers, and minimally-whitespaced text is free to modify it! (A re-indenting utility might help here - though a quick run against the K&R style expands it to 362 lines and reveals the terrifying depth of the conditional statements lurking within. Fair warning.)

No comments:

Post a Comment