title: How to approach developing a Chat Bot in C#
body: <p>I'm creating a chat bot in C# for a uni project and I'm currently unsure as to how best to go about it. I'm new to OO programming and C#.</p>
  
  <p>The basis of how the chat bot has to work is that it is meant to learn, the more it interacts with the user. It achieves this by parsing all user input sentences and counts how many times a certain word follows each word.</p>
  
  <p>The program takes a random word from the sentence and uses the word graph to generate a reply.</p>
  
  <p>So, for example, the following quote could be split into:</p>
  
  <p>“I wandered lonely as a cloud that floats on high ore vales and hills when all at one I saw a crowd a host of golden daffodils”</p>
  
  <p><strong>I:</strong> wandered (1) saw (1)</p>
  
  <p><strong>wandered:</strong> lonely(1)</p>
  
  <p><strong>lonely:</strong> as(1)</p>
  
  <p><strong>as:</strong> a(1)</p>
  
  <p><strong>a:</strong> cloud (1)crowd (1)host(1)</p>
  
  <p><strong>cloud:</strong> that(1)</p>
  
  <p>etc...</p>
  
  <p>So far, I have the idea to use a followingWord class which holds a following word and a count of how many times that has followed the Main word. </p>
  
  <p>The MainWord class holds the word and a list of type FollowingWord which holds the following words and their counts.</p>
  
  <pre><code>class FollowingWord
  {
  string word; //the following word
  int count;  //the amount of times word has followed the main word.
  }
  
  class MainWord
  {
  string word;        //the main word
  List&lt;FollowWord&gt; following = new List&lt;FollowWord&gt;();    //a list of type FollowWord which holds all the following words and their counts.
  
  }
  </code></pre>
  
  <p>Am I on the right track here? Because I haven't been able to think of any other way to approach this.</p>