[D] ML algorithm to detect opposite sentences

I am a beginner and an amateur, and I was searching the web to see if there is an ML algo that could detect if two sentences are similar. I came across 'semantic similarity' however it had one problem:
given two sentences --
1. The movie was very good

  1. the movie was not very good

most algorithms predicted them to be almost perfectly similar. So I want to know if there is a different algorithm or technique that could help detect the difference between such sentences