What algorithm is used for finding ngrams?
Supposing my input data is an array of words and the size of the ngrams I want to find, what algorithm I should use?
You can use ngram package. One example of its usage is http://amunategui.github.io/speak-like-a-doctor/