Created
November 14, 2021 20:31
-
-
Save elsanussi-s-mneina/ff3c705943da80e28d2758e6626a005d to your computer and use it in GitHub Desktop.
Generates fake Arabic words with two differing consonants. (for purpose of pronunciation practice)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
const nilVowel string = "ْ" | |
var consonants []string = []string{"أ", | |
"ب", | |
"ت", | |
"ث", | |
"ج", | |
"ح", | |
"خ", | |
"د", | |
"ذ", | |
"ر", | |
"ز", | |
"س", | |
"ش", | |
"ص", | |
"ض", | |
"ط", | |
"ظ", | |
"ع", | |
"غ", | |
"ف", | |
"ق", | |
"ك", | |
"ل", | |
"م", | |
"ن", | |
"ه", | |
"و", | |
"ي", | |
} | |
var vowels []string = []string{"َ", | |
"ِ", | |
"ُ", | |
} | |
func printCVCSequences(targets []string) { | |
fmt.Println("Printing consonant vowel sequences") | |
fmt.Println("Focussing on the difference between:") | |
fmt.Println(targets) | |
for _, consonant := range consonants { | |
for _, vowel := range vowels { | |
for _, target := range targets { | |
if consonant == "أ" && vowel == "ِ" { | |
fmt.Println("إِ" + target + nilVowel) | |
} else { | |
fmt.Println(consonant + vowel + target + nilVowel) | |
} | |
} | |
} | |
} | |
} | |
func printAllConsonants() { | |
for i := 0; i < len(consonants); i++ { | |
fmt.Println(consonants[i]) | |
} | |
} | |
func main() { | |
fmt.Println("Arabic Fake minimal pair generator") | |
printCVCSequences([]string{"ص", "س"}) | |
fmt.Println("Program exited normally") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment