Ported capitalization assist to the python version