Class to represent a term category pair