-1

I'm working on a project that aims to find conflicting Semantic Sentences (NLP - Semantic Search ) For example

Our text is: "I ate today. The lunch was very tasty. I was an honest guest."

Query: "I had lunch with my friend"

Do we want to give the query model and find the meaning of the sentences with a certain point in terms of synonyms and antonyms?

The solution that came to my mind was to first find the synonymous sentences and extract the key words from the synonymous sentences and then get the semantic opposite words and then find the semantic synonymous sentences based on these opposite words. Do you think this idea is possible? If you have a solution or experience in this area, please reply

Thanks

1 Answers1

0

You have not mentioned the exact use case for your problem so I am not sure if the solution I know will help your cause. But there is an approach in NLP (using Deep learning) which helps to find whether two sentences are correlated, unrelated or contradictory.

Below is the information about the pretrained model which is trained specifically for this task -> https://huggingface.co/facebook/bart-large-mnli

The dataset on which the above model is trained is given here -> https://huggingface.co/datasets/glue/viewer/mnli/train

You can check the dataset to verify if your use case is related to the classification task performed on the dataset. Since the model is already pretrained, you do not need to perform any training and can jump straight to evaluation. Once you can somewhat satisfied with the results, you can fine tune the model a bit for your specific problem.

We can talk in comments if you need more clarification.