changed functions to simplify use as module

- added init function to initialize dictionaries and global variables
- renamed parser to translate
- renamed translate to translate_file