Boyer-Moore string search: Difference between revisions
Content added Content deleted
m (There's some statistical issues relevant to substring positions and testing, so might as well make it easy for people who want to exercise that sort of thing) |
|||
Line 9: | Line 9: | ||
[https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string-search_algorithm Follow this link for more information about this algorithm]. |
[https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string-search_algorithm Follow this link for more information about this algorithm]. |
||
To properly test this algorithm, it would be good to search for a string which contains repeated subsequences, such as <code>alfalfa</code> and the text being searched should not only include a match but that match should be preceded by words which partially match, such as <code>behalf</code>. |
To properly test this algorithm, it would be good to search for a string which contains repeated subsequences, such as <code>alfalfa</code> and the text being searched should not only include a match but that match should be preceded by words which partially match, such as <code>alfredo</code>, <code>behalf</code>, <code>calfskin</code>, <code>halfhearted</code>, <code>malfunction</code> or <code>severalfold</code>. |
||
=={{header|Emacs Lisp}}== |
=={{header|Emacs Lisp}}== |