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.
In reply to Re: Splitting a string
by graff
in thread Splitting a string
by lampros21_7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |