adding subword mode for python