title: Support Vector Machine / K-nearest-neighbor code samples
body: <p>I am trying to code up either a SVM or a KNN program to classify text documents. I grasp the concepts of both, but I would love to see some nice code examples that specifically demonstrate how to represent the text/words as vectors. Any one know of good tutorials/articles/lectures/anything with code examples? Even code that I could step through myself would be nice. I'm best at ruby and java, although python, javascript, c++ I can understand. I'll take examples in any language though really. </p>