How to give the nearest text that the user has written In my database I have 1500 food dishes, not all are single words, there are compound words like &quot;cheese with dried fruit and nuts&quot;. And I have them in 5 languages (de, en, fr, es, it).
My question is how could I do it so that given a text it gives me a prediction of the 5 dishes that are closest to that text.
For example, if the user search for &quot;roquefort with almonds&quot; as closest would return &quot;cheese with dried fruit and nuts&quot; and other 4 results with other dishes.
I have thought about using the Word2Vec model but I am not sure how to start (I am quite a novice) if I should do transfer learning, or how.
Could someone guide me on how to approach the solution to this problem?
This is not an easy task.  There is no simple answer; you could do something crude that might give mediocre results, or you could put a lot of effort into it; and it's not obvious to me what will work best.
One possible simple approach is to map each word (except for a few stopwords) to an encoding, using a standard word embedding (e.g., word2vec), average the vectors of the words to get an embedding of the phrase, and then compare two phrases using the L2 distance of their embeddings.  I don't know how well this will work; you could try it and see.
There will probably be more sophisticated approaches, e.g., training a language-based model to compare two phrases for similarity, perhaps building on an existing model (such as BERT) and fine-tuning it.  I anticipate this will require many labelled samples and a non-trivial amount of research and experimentation, so it's not a minor project to take on.