From 21ed4680ce724d10a897872a029256d5cce6c0b6 Mon Sep 17 00:00:00 2001 From: Baelyk Date: Thu, 15 Mar 2018 22:47:35 -0500 Subject: [PATCH] Updated pig-latin README The update was discussed in the problem-specifications repo in pr #1171: pig-latin improve documentation https://github.com/exercism/problem-specifications/pull/1171 --- exercises/pig-latin/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/pig-latin/README.md b/exercises/pig-latin/README.md index de7eac0ab..f94e780f1 100644 --- a/exercises/pig-latin/README.md +++ b/exercises/pig-latin/README.md @@ -7,10 +7,10 @@ confusing. It obeys a few simple rules (below), but when it's spoken quickly it's really difficult for non-children (and non-native speakers) to understand. -- **Rule 1**: If a word begins with a vowel sound, add an "ay" sound to - the end of the word. -- **Rule 2**: If a word begins with a consonant sound, move it to the - end of the word, and then add an "ay" sound to the end of the word. +- **Rule 1**: If a word begins with a vowel sound, add an "ay" sound to the end of the word. Please note that "xr" and "yt" at the beginning of a word make vowel sounds (e.g. "xray" -> "xrayay", "yttria" -> "yttriaay"). +- **Rule 2**: If a word begins with a consonant sound, move it to the end of the word and then add an "ay" sound to the end of the word. Consonant sounds can be made up of multiple consonants, a.k.a. a consonant cluster (e.g. "chair" -> "airchay"). +- **Rule 3**: If a word starts with a consonant sound followed by "qu", move it to the end of the word, and then add an "ay" sound to the end of the word (e.g. "square" -> "aresquay"). +- **Rule 4**: If a word contains a "y" after a consonant cluster or as the second letter in a two letter word it makes a vowel sound (e.g. "rhythm" -> "ythmrhay", "my" -> "ymay"). There are a few more rules for edge cases, and there are regional variants too.