Exemplo n.º 1
0
 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()));
 }
Exemplo n.º 2
0
 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");
 }
Exemplo n.º 3
0
        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));
            }
        }