I searched a lot for a solution and I indeed have found similar questions. This answer gives back the longest sequence of CHARACTERS that might NOT belong in all of the strings in the input list. This answer gives back the longest common sequences of WORDS that MUST belong to all of the strings in the input list.
I am looking for a combination of the above solutions. That is, I want the longest sequence of common WORDS that might NOT appear in all of the words/phrases of the input list.
Here are some examples of what is expected:
['exterior lighting', 'interior lighting']
--> 'lighting'
['ambient lighting', 'ambient light']
--> 'ambient'
['led turn signal lamp', 'turn signal lamp', 'signal and ambient lamp', 'turn signal light']
--> 'turn signal lamp'
['ambient lighting', 'infrared light']
--> ''
Thank you