The Levenshtein algorithm and some ratio and proportion may handle this use case.
Based on the pre-defined sequence of statements, such as "I have a dog", "I own a car" and many more, I must determine if an another input statement such as "I have a cat" is the same or how much percentage does the input statement is most likely equal to the pre-defined statements.
For Example:
Predefined statements: "I have a dog", "I own a car", "You think you are smart"
Input statements and results:
I have a dog - 100% (because it has exact match), I have a cat - ~75% (because it was almost the same except for the animal, think - ~10% (because it was just a small part of the third statement), bottle - 0% (because it has no match at all)
The requirement is that TensorFlow be used rather than Java, which is the language I know, so any help with what to look at to get started would be helpful.
My plan was to use the predefined statements as the train_data, and to output only the accuracy during the prediction, but I don't know what model to use. Please, guide me with the architecture and I will try to implement it.