generate_terms function

Generate terms.object (formula with attributes)