Python script to convert text in a .txt file to Pig Latin and back
Pig Latin is a language game in which words in English are altered. The objective is to conceal the meaning of the words from others not familiar with the rules. The reference to Latin is a deliberate misnomer, as it is simply a form of jargon, used only for its English connotations as a strange and foreign-sounding language. (source: Wikipedia)
This is not a true representation of Pig Latin, but it is close enough.
The script translates the files with the vanilla Pig Latin rules. The reverse translation adds the letter y to all words starting with vowels.
For example -
Enjoy > Enjoyyay
Enjoyyay > yEnjoy
- Run the script
- Specify the file to be translated
- Specify whether you want to decrypt (Pig latin to English) or encrypt (English to Pig Latin)
- Specify if you want to save the converted text in the original file or another file
- The converted text will be saved in your provided output file
- Python 3.4.4 ( Find it here )
Enjoy! (Or Enjoyyay!)