Text this: A Framework for Characterization of Optimal Decision Rules in Hypothesis-Testing Problems.