1. A method of determining one or more patterns in a sequence of symbols, wherein the method comprises the steps of: a) analyzing the sequence of symbols using a processing system comprising a computer processor, such that a rule is generated to replace non-unique diagrams occurring in the sequence, the rule comprising one or more symbols and/or a further rule, wherein each rule is checked to comply with a requirement that there are multiple instances of the rule occurring in the sequence of symbols such that a rule that occurs only once in the sequence is expanded by reverting the rule to a symbol pattern originally replaced by the rule, and wherein step a) is repeated until no further non-unique diagrams may be replaced by a rule.