[generator.py] Reorganize the program flow. Now it will also read from phonetic input file.

Remarks: Although it read from phonetic input file , it doesn't use the data yet.