{'fraction_non_alphanumeric': 0.015360983102918587, 'fraction_numerical': 0.0, 'mean_word_length': 4.821428571428571, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A String Matching Algorithm Based on Efficient Hash Function

Based on the Karp-Rabin algorithm, a fast string matching algorithm is presented in this paper. It is also a hash- based approach, comparing the hash value of strings called fingerprint rather than the letters directly. The characteristic of the algorithm is that the hash function exploits bitwise operations and also considers about the size of the alphabet and the length of the pattern. We prove that the probability of a hash collision is minute and that the average running time is linear. Through a series of experiments, the remarkable performance of our algorithm is demonstrated.