Rules and Examples

Rules

If word begins with consonant sound, all letters before the initial vowel are placed at the end of the word sequence. Then, “ay” is added.

  • pig => igpay
  • banana => ananabay
  • trash => ashtray
  • happy => appyhay
  • duck => uckday
  • glove => oveglay

If word begins with vowel sounds or a silent letter, one just adds “yay” to the end.

  • eat => eatyay
  • omelet => omeletyay
  • are => areyay

Interpretations and Assumptions

Following are some assumptions made in implementation

Silent Letters

In order to infer silent letters cmu pronunication corpus of 134K words was used(http://www.nltk.org/_modules/nltk/corpus/reader/cmudict.html). The words with silent first letter were filtered into ~1.5K words silent_words.json. Among them the most common prefixes were chosen as approximation of silent words. These include

( “pf”, “ph”, “ps”, “pn”, “pt”, “wr”, “ts”, “gn”, “kn”, “jo”, “he”)

Casing

The cases of individual words are to be preserved. For example for the sentence
Who are you?
title case of word who is preserved after translation
Owhay areyay ouyay?

Punctuation

Punctuation is preserved. Special case is if punctuation is part of the word such as ‘ in don’t it is considered as a single word and translated to on’tday

Sample Cases

Following are some sample sentences and their translations that capture the assumptions.

Sentence Translation
How do you say ... in Pig Latin? Owhay oday ouyay aysay ... inyay Igpay Atinlay?
Where is the toilet? Erewhay isyay ethay oilettay?
Call the police! Allcay ethay olicepay!
How do you say ... in Pig Latin?! I don’t know! Owhay oday ouyay aysay ... inyay Igpay Atinlay?! Iyay on’tday owknay!
Rhythm Rhythmay