An implementation of various string search algorithms for Swift.
- Exact Pattern Matching Problem (EPMP)
- Naive algorithm (quadratic time)
- Z-Box algorithm (linear time)
- Boyer-Moore algorithm
- Knuth-Morris-Pratt algorithm
- Ukkonen's algorithm
- Exact Set Matching Problem (ESMP)
- Naive algorithm
- Aho-Corasick algorithm
- To build the package, make sure to have Swift 5.9 or newer installed and run
swift build
. - To run the test suite, invoke
swift test
. - To run the benchmarks, invoke
Scripts/run-benchmarks
and thenScripts/plot-benchmarks
to plot them (make sure to have Python 3.9 or newer,matplotlib
,numpy
andscipy
installed)