Lab Assignment, Foundations of Computing


Write a sed script to translate English to Pig Latin.

English words that begin with vowels are translated by adding the suffix way: apple becomes appleway, under becomes underway etc. Words that begin with consonants are translated by moving the consonant to the end of the word and adding the suffix ay: dog becomes ogday, trouble becomes roubletay. To make it easy, we'll just handle the first letter rather than the first phoneme (sound), so you can translate this to histay (not isthay as a native Pig Latin speaker might do it).

To make this easy, you can assume that your source text will only contain lower case letters, spaces, and linebreaks. (After all, we already know how to write scripts to translate files to this form). Your script need not handle capital letters, digits, punctuation, tabs etc. etc.

Turn in one sheet of paper that shows your script, a short sample of English input, and the translated Pig Latin output.

You are encouraged to work in groups to write the script. You must list the other co-authors of the script on your assignments. You must use your own unique English input.

The assignment is due in the lab on Tuesday, February 27.