Add script for converting to dict index format.

Signed-off-by: Bao Haojun <baohaojun@gmail.com>