I pastebined the code. It's terrible. I should rewrite it. But here it is: http://pastebin.com/CM9u17jq
The neural network predicts which thread is most likely to produce a satisfying answer. The main features are number of n-gram matches with the question, the score, the number of comments, and some other metadata.
It's far from optimal but it does improve it a bit.