create definition files for root words; detect templates in definitions