Example #1
0
 public void loadFiles()
 {
     path       = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName;
     layoutFile = path + "/layout.JSON";
     words      = File.ReadAllLines(path + "/words.csv")
                  .Select(v => WordObj.FromCsv(v))
                  .ToList();
 }
Example #2
0
            public static WordObj FromCsv(string csvline)
            {
                string[] values  = csvline.Split(',');
                WordObj  wordObj = new WordObj();

                wordObj.word      = values[0];
                wordObj.frequency = Convert.ToInt32(values[1]);
                return(wordObj);
            }