script for dictionary generation