Is there a general method to crack this type of fractionating cipher?
Known plaintext attacks and chosen plain-text attacks

The attack here is straightforward. If you have any known plain-text at all, you can find  codes for all the letters in the plain-text you have. You can then use this knowledge to decrypt other messages whose plain-text is unknown. 

A very small number of known plaintexts would completely compromise this scheme.

Ciphertext only attack

Each letter within a language has a certain probablity of occurring. In English, the letter "e" is the most frequently used letters. 

This wikipedia article gives a nice table of all the English letters and their frequencies.

The attack is fairly straightforward. Take a given cipher-text and build a frequency table for all one digit strings, two digit strings, three digits strings etc.

Then compare each string's relative frequencies compared to the table linked in the Wikipedia article. If there is a rough correspondence between a given sequence of digits and a given letter, substitute that sequence for the letter in question. 

Most of the time, the substitution will be valid and the plaintext will quickly fall in to view.