From 1d3d57668ab14ab7b29b0beeba45a03d345d0ed9 Mon Sep 17 00:00:00 2001 From: Roberto C Navarro Date: Mon, 5 Feb 2018 16:16:18 -0600 Subject: [PATCH 1/3] add more rules to the pig latin exercise to help make it clearer --- exercises/pig-latin/description.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/exercises/pig-latin/description.md b/exercises/pig-latin/description.md index 2e528852c3..8af3e5f205 100644 --- a/exercises/pig-latin/description.md +++ b/exercises/pig-latin/description.md @@ -5,10 +5,12 @@ 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 +* **Rule 1**: If a word begins with a vowel sound, add an "ay" sound to + the end of the word. Treat "xr" and "yt" at the beginning of a word as vowels ("xray" -> "xrayay"). +* **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 3**: If a word starts with the following consonant clusters "ch", "qu", "th", "thr", "sch" and any consonant followed by "qu" at the beginning of the word, move it to the end of the word, and then add an "ay" sound to the end of the word (e.g. "chair" -> "airchay", "square" -> "aresquay", "thread" -> "eadthray"). +* **Rule 4**: If "y" comes as the beginning of the word then it must be treated as a consonant, and if it comes after a consonant cluster or is the second letter in a two letter word it must be treated as a vowel. There are a few more rules for edge cases, and there are regional variants too. From 4ac5c396f9711a4686127a745352ef4f4182dbaf Mon Sep 17 00:00:00 2001 From: Roberto C Navarro Date: Thu, 8 Feb 2018 09:37:35 -0600 Subject: [PATCH 2/3] made suggested updates to rules --- exercises/pig-latin/description.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/exercises/pig-latin/description.md b/exercises/pig-latin/description.md index 8af3e5f205..c79d68adc1 100644 --- a/exercises/pig-latin/description.md +++ b/exercises/pig-latin/description.md @@ -5,12 +5,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. Treat "xr" and "yt" at the beginning of a word as vowels ("xray" -> "xrayay"). -* **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 3**: If a word starts with the following consonant clusters "ch", "qu", "th", "thr", "sch" and any consonant followed by "qu" at the beginning of the word, move it to the end of the word, and then add an "ay" sound to the end of the word (e.g. "chair" -> "airchay", "square" -> "aresquay", "thread" -> "eadthray"). -* **Rule 4**: If "y" comes as the beginning of the word then it must be treated as a consonant, and if it comes after a consonant cluster or is the second letter in a two letter word it must be treated as a vowel. +- **Rule 1**: If a word begins with a vowel sound, add an "ay" sound to the end of the word. Treat "xr" and "yt" at the beginning of a word as vowels (e.g. "xray" -> "xrayay", "yttria" -> "yttriaay"). +- **Rule 2**: If a word begins with a consonant sound (can be made up of multiple consonants a.k.a consonant cluster), move it to the end of the word. +- **Rule 3**: If a word starts any consonant followed by "qu" at the beginning of the word, 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 treat it as a vowel by leaving in it place. There are a few more rules for edge cases, and there are regional variants too. From 69378f9c1317b0495198bd5930c86d37cb345562 Mon Sep 17 00:00:00 2001 From: Roberto C Navarro Date: Thu, 8 Feb 2018 16:21:46 -0600 Subject: [PATCH 3/3] apply proposed changes to clarify the rules --- exercises/pig-latin/description.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/pig-latin/description.md b/exercises/pig-latin/description.md index c79d68adc1..ee354c6d3a 100644 --- a/exercises/pig-latin/description.md +++ b/exercises/pig-latin/description.md @@ -5,10 +5,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. Treat "xr" and "yt" at the beginning of a word as vowels (e.g. "xray" -> "xrayay", "yttria" -> "yttriaay"). -- **Rule 2**: If a word begins with a consonant sound (can be made up of multiple consonants a.k.a consonant cluster), move it to the end of the word. -- **Rule 3**: If a word starts any consonant followed by "qu" at the beginning of the word, 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 treat it as a vowel by leaving in it place. +- **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.