added term matrix module and create_dictionary method for all models