Creating sets to manage terms and words