I don't want to find "abc" in strings ["kkkabczzz", "shdirabckai"]
Not like that.
But bigger patterns like this:
If I have to _________, then I will ___.
["If I have to do it, then I will do it right.", "Even if I have to make it, I will not make it without Jack.", "....If I have to do, I will not...."]
I WANT TO DISCOVER NEW PATTERNS LIKE THE ABOVE. I don't already know the patterns.
I want to discover patterns in a large array or database of strings. Say going over the contents of an entire book.
Example usage of this would be finding the most common sentence structures a book uses.
The goal isn't to create the perfect algorithm or anything. I am willing to do it the brute-force way if need be like you might to find common substrings in sentences.
Is there a way to find patterns like this?