in reply to Splitting a string
So naturally there is a module that does this: Text::Ngram.
The only thing special about your particular case is that you want to ignore spaces (most bigram analyses of text retain the spaces, because they are meaningful for text analysis). But that's fine -- just do tr/ //d on your string before you pass it to Text::Ngram.
|
|---|