package ucca import "strings" // normalizeGerman lowercases and folds German umlauts / ß to their ASCII digraphs // (ä→ae, ö→oe, ü→ue, ß→ss) so keyword matching is insensitive to whether the user // typed "Prüfe" or "Pruefe", "Datenschutzerklärung" or "Datenschutzerklaerung". // Applied to BOTH the query and the keyword lists in the German-text matchers. func normalizeGerman(s string) string { return umlautFolder.Replace(strings.ToLower(s)) } var umlautFolder = strings.NewReplacer( "ä", "ae", "ö", "oe", "ü", "ue", "ß", "ss", )