I'm working on an android project where I need to judge/grade user String
entries and compare them to a "correct answer", which is also a String
. So for example, if I ask the question 'What do you call items given to children during Christmas meant to spark joy in their hearts?', and set the answer to "gifts". In this case, I'd want my algorithm to accept 'gifts', 'gift', 'present', 'presents', 'Christmas gifts', 'Xmas gifts'...etc as correct answers. Sure, I could create an array with all possible answers, but that's not ideal, especially when I'm dealing with longer prose text.
So the question is..are there any recommended algorithms or libraries I could use for this? If not, what are some good alternatives?