For all ML algorithms text must be presented as digit vector. I suggest use TF-idF algorithm for a start. You can learn more about it here: RUS ENG
Also suggest to find implemintation of this algorithm in another gems but placed it in our function for more cofortable set up