I want to implement a simple Machine Learning algorithm using unsupervised learning algorithms to classify a bunch of sentences based on their topic. I get that there are ways to do that, different algorithms like the probability of it being a certain topic, to check the number of certain words in the different documents and all. But I'm not getting how to implement this practically, that is, with actual code in MATLAB or any other language. If you open the file in MATLAB, you get the text in - you write code to check if a certain set of words are present in the text, and based on that you classify. But how do we concretely apply the Machine Learning algorithms to this? Some help would be appreciated, as well as resources, if you know of any.