I have two different invoices or receipts. One is a Purchase order one is something like a receipt(acknowledgement). Suppose I have ordered(PO) Wine: 1. White Wine 2. Red Wine 3. Rose Wine And I receive the acknowledgement as: 1. Wine Red Jacobs Creek 2. White Wine 3. Winter's Hill Estate Dry Rose I want to match the strings (items) in the Purchase Order and the Invoice. Can you suggest me ways to do it. I have tried vectorization using [Count Vectorization Alg][1] Then have used [distance measures][2] to calculate similarity using: 'dice', 'rogerstanimoto', 'yule', 'hamming', 'jaccard', 'braycurtis', 'canberra', 'cityblock', 'correlation', 'cosine', 'euclidean', and 'minkowski' The problem is the position of Words. *Red Wine* is will not be similar to *Wine Red*. But that should not be the case. I have tried Word2Vec Algorithm too but as this is not language technically just Nouns. It did not work. [1]: https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html [2]: https://docs.scipy.org/doc/scipy/reference/spatial.distance.html