term-doc matrix classes