ostafen / smart

String Matching Algorithms Research Tool
https://smart-tool.github.io/smart/
GNU General Public License v3.0
4 stars 2 forks source link

Benchmarking with user defined pattern gives ERROR #85

Closed nishihatapalmer closed 5 months ago

nishihatapalmer commented 1 year ago

Benchmarking with a user defined pattern gives an ERROR result if the user defined pattern is not in the text being searched.

This is because smart assumes that there must be a match in the text (as the normal process is to extract the pattern from the text). A count of zero is interpreted as ERROR, even if that is actually correct.

Fix is probably (when using a user-defined pattern) to perform a brute force search and compare the count results of the algorithms with the actual result. This could be done once per text , as the pattern does not change.

nishihatapalmer commented 5 months ago

This is fixed in the recent merge.