Looking for most frequent pattern
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/11090289/find-longest-repetitive-sequence-in-a-string">Find longest repetitive sequence in a string</a>  </p>
</blockquote>



<p>I'm working on a problem and I need to find pattern that's repeating most.</p>

<p>For simplicity and convenience please consider this string:</p>

<pre><code>What is Lorem Ipsum?
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s...
</code></pre>

<p>Sequence that repeats most (initially considering string length greater the 3 characters, for example) is "Lorem Ipsum". "Lorem" and "Ipsum" also repeat the same number of times of course, but longer string has precedence over shorter if they repeat same number of times.</p>

<p>What kind of algorithm can efficiently find this pattern, preferably in Python?</p>
