func initializeKnownSyllables() {
	wordsWithSyllableCount = make(map[string]int)

	syllablesCountFilename := DataFolder + "syllables.csv"

	csvFile, err := os.Open(syllablesCountFilename)
	if err != nil {
		log.Println("WARNING: syllables data file not present (data/syllables.csv). Will figure out the syllable counts by guessing", err)
		wordsWithSyllableCount["a"] = 1
	} else {
		scanner := bufio.NewScanner(csvFile)
		for scanner.Scan() {
			line := scanner.Text()
			fragments := strings.Split(line, ";")
			count, _ := strconv.Atoi(fragments[1])
			wordsWithSyllableCount[fragments[0]] = count
		}
		csvFile.Close()
	}
}
// initializeKnownSyllables initializes the syllable count map and reads the known words from the data file
initializeKnownSyllables initializes the syllable count map and reads the known words from the data file
// initializeKnownSyllables initializes the syllable count map and reads the known words from the data file
func initializeKnownSyllables() {
	wordsWithSyllableCount = make(map[string]int)
	syllablesCountFilename := DataFolder + "syllables.csv"
	csvFile, err := os.Open(syllablesCountFilename)
	if err != nil {
		log.Println("WARNING: syllables data file not present (data/syllables.csv). Will figure out the syllable counts by guessing", err)
		wordsWithSyllableCount["a"] = 1
	} else {
		scanner := bufio.NewScanner(csvFile)
		for scanner.Scan() {
			line := scanner.Text()
			fragments := strings.Split(line, ";")
			count, _ := strconv.Atoi(fragments[1])
			wordsWithSyllableCount[fragments[0]] = count
		}
		csvFile.Close()
	}
}
func initializeKnownSyllables ( ) { wordsWithSyllableCount = make ( map [ string ] int ) syllablesCountFilename := DataFolder + " " csvFile , err := os . Open ( syllablesCountFilename ) if err != nil { log . Println ( " " , err ) wordsWithSyllableCount [ " " ] = 1 } else { scanner := bufio . NewScanner ( csvFile ) for scanner . Scan ( ) { line := scanner . Text ( ) fragments := strings . Split ( line , " " ) count , _ := strconv . Atoi ( fragments [ 1 ] ) wordsWithSyllableCount [ fragments [ 0 ] ] = count } csvFile . Close ( ) } }
initializeKnownSyllables initializes the syllable count map and reads the known words from the data file
initializeKnownSyllables initializes the syllable count map and reads the known words from the data file