public static string getCityName() { for (int t = 0; t < 100; t++) { string reply = model.capFirst(model.getWord()); if (verboten.Contains(reply)) { //World.Log("Caught verboten word: " + reply); continue; } if (usedCityNames.Contains(reply)) { continue; } usedCityNames.Add(reply); return(reply); } return(model.capFirst(model.getWord())); }
public static string getName(bool male) { for (int i = 0; i < 100; i++) { string word = amerimodel.capFirst(amerimodel.getWord()); if (verboten.Contains(word)) { continue; } return(word); } return("Alhazred"); }
public static void buildVerboten() { verboten.Add("dong"); verboten.Add("wang"); verboten.Add("mong"); verboten.Add("dick"); verboten.Add("f**k"); verboten.Add("c**t"); verboten.Add("shit"); verboten.Add("crap"); MarkovModel capper = new MarkovModel(); HashSet <string> lowerV = new HashSet <string>(); foreach (string s in verboten) { lowerV.Add(s); } foreach (string s in lowerV) { verboten.Add(capper.capFirst(s)); } }