Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 478 Bytes

README.md

File metadata and controls

14 lines (11 loc) · 478 Bytes

String_Match_Python_call_C

String Matching Algorithm Harpool BM using python to call C. This project provide a example of python call C to realize string match.

the API is [result, number] = search(pattern, text) result---True means pattern in text result---False means pattern not in text

The efficiency of Harpool BM with C is 5-times than that with Python.

Test Result: For 147 file document.(text) 40 short document.(pattern). The algorithm claculation time is 0.03s.