Dictionary generation gadget for STM