pigpy
- 2 Devlogs
- 15 Total hours
A python document that you can run pigpython (pigpython) in.
pigpy is essentially python but with all words translated into pig latin.
A python document that you can run pigpython (pigpython) in.
pigpy is essentially python but with all words translated into pig latin.
devlog 2 in piglatin
I haven’t posted a devlog in over 8 hours of work because I’ve been working on pretty much the same function for ages!! I think I’d better just bite the bullet and write about it even when it’s still not finished
^- This will be especially useful for the combine function, because it is (imo) so long and complex, and I’d like to break it up into smaller functions to make it easier to read, understand, and debug!!
Now, you may think this program is simple enough since I just have to translate pig latin into english then run it through python, but there’s one major flaw.
English to pig latin translation is a many-to-one function: up to two English words can translate to the same pig latin word. E.g. ‘in’ and ‘win’ both translate to ‘inway’.
Because of this, there’s no way to tell if inway should translate back to in or way. Luckily, in most cases where pig latin translates to two possible words, only one of them makes sense, and is an actual word. Thus I can use this to my advantage when narrowing down possbile translations.
##The screenshot:
The screenshot shows the output of separating and finding translations for a pigpy program before adding the dictionary. After adding the dictionary, the totalPossibilities (for the full translation) reduced by 508 to just 4!
Next is to test each translation combination by running them through python. Hopefully all but one combination are eliminated, and therefore the correct output can be given to the user.