Adam335
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 21464 |
|
|
| 12 Jun 2013 10:19 PM |
Check out the code if you want: pastebin/nBhRQyE6
It will translate any English word into Pig Latin. |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 12 Jun 2013 10:21 PM |
I don't know Python, but that really doesn't look like it works perfectly.
forum -> orumfay tree -> eetray egg -> eggway
is how it should work. |
|
|
| Report Abuse |
|
|
Adam335
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 21464 |
|
|
| 12 Jun 2013 11:18 PM |
Waffle, allow me to describe Pig Latin
If the first letter of the word is a vowel, 'ay' is added to the end of that word.
If the first letter of the word is a consonant, 'ay' is added to the end and the first letter is switched to the end of the word, after 'ay'
Therefore, it would be:
Forum -> 'orumayf' Tree -> 'reeayt' egg -> 'e-g-g-a-y' |
|
|
| Report Abuse |
|
|
Adam335
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 21464 |
|
|
| 12 Jun 2013 11:19 PM |
| Ignore the dashes in the result of "egg", I did that to pass the filter. I got blocked when I tried posting without then, apparently. |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2013 11:20 PM |
| No, the first letter is added to the end and THEN -ay is added. |
|
|
| Report Abuse |
|
|
Adam335
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 21464 |
|
|
| 12 Jun 2013 11:20 PM |
them*
Apologies, I am on a mobile device. |
|
|
| Report Abuse |
|
|
Adam335
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 21464 |
|
|
| 12 Jun 2013 11:22 PM |
@king
It is possible I mixed that up, but I'm not quite sure you are correct. |
|
|
| Report Abuse |
|
|
Adam335
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 21464 |
|
|
| 12 Jun 2013 11:25 PM |
Oh, wait, king's right. My bad.
It would instead be:
forum -> orumfay tree -> reetay
|
|
|
| Report Abuse |
|
|
Parthax
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 6941 |
|
|
| 13 Jun 2013 12:06 AM |
ppppssshhh who needs pig Latin when you have actual latin |
|
|
| Report Abuse |
|
|
abaw7
|
  |
| Joined: 23 Oct 2009 |
| Total Posts: 745 |
|
|
| 13 Jun 2013 12:09 AM |
| Who needs Latin unless you plan to make your own language |
|
|
| Report Abuse |
|
|
Parthax
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 6941 |
|
| |
|
Waffle3z
|
  |
| Joined: 15 Apr 2011 |
| Total Posts: 266 |
|
|
| 13 Jun 2013 09:38 AM |
| tree -> eetray, not reetay |
|
|
| Report Abuse |
|
|
Adam335
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 21464 |
|
|
| 13 Jun 2013 09:59 AM |
No, waffle.
If the word starts with a consonant, it is put at the end of the word along with "ay".
It would be tree -> reetay. |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2013 10:03 AM |
| Are we seriously discussing a silly made up language. |
|
|
| Report Abuse |
|
|
Adam335
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 21464 |
|
|
| 13 Jun 2013 10:06 AM |
@thedestroyer115
It's just a small Python project I thought I would make. |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2013 10:12 AM |
| Actually, waffle is right. The article says the first consonant *cluster* is added to the end. |
|
|
| Report Abuse |
|
|
Adam335
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 21464 |
|
| |
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 13 Jun 2013 10:25 AM |
| YARGHMANREALLYOHYARAGHSREALLYGH. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 13 Jun 2013 03:08 PM |
I wrote a translator in Lua.
s="This sentence is going to be translated into piglatin!" s=s:gsub("(%w)([%w']*)",function(a,b) if a:lower():find('[aeiou]')then return a..b..'way'else return (a~=a:lower()and b:sub(1,1):upper()or b:sub(1,1))..b:sub(2)..a:lower()..'ay' end end) print(s)
Cases such as "ithway" are confusing. |
|
|
| Report Abuse |
|
|