Approximate Circular String Search

PATTERN

TEXT

RESULT

  • Choose K Bound:
  • Choose Filters:
  • Remove False Positives:

Instructions

This online tool searches an input text for matches of an input pattern. A match can either be the original input pattern or any rotation of the input pattern. A match may also be approximate within the user specified bound. The text is first filtered with 1 to 3 filters to a reduced search space, represented by a list of 0-indexed locations in the text. These indices represent the location of candidate matches and may include false positives. These filtered candidates can optionally be verified to produce a final definitive list of matches.

K Bound: Describes the maximum number of mismatches between pattern and text that may be ignored. K = 0 is equivalent to exact circular string matching. K = 1 means all but 1 character was matched etc.

Filters: There are 1 to 3 filters that may be applied in the filtering stage. Applying additional filters may increase the search time but reduces the size of the final list of candidate locations.

  1. Value Sum
  2. Absolute Character Difference Sum
  3. Individual Character Count

Remove False Positives: If this is not checked, the list of locations produced will represent candidate locations of matches and may contain false positives. If this is checked, the list of locations will be the final correct list of match locations.