I'd like to know if such an algorithm exists and is implemented in any database (ideally Postgres).
Levenstein matches strings, but I'd like to compare strings based on the number of matching words. For example, having:
the quick brown fox jumps over the lazy dog
I should come with a result of 2 if i try to match it against
the pen lies over the table
because it matched "the" and "over" on both the sentences