Text this: Learning graphical models for hypothesis testing and classification