Restored getScoreFunction() method.