Giving Suggestions to the errors

How you are giving correct suggestion to a word?
Like book - NN ----------------> books - NNS
How you finding the NNS of the word “book”(NN) is “books”?
Please let me know what is the corresponding java file that giving suggestions?

Please see org.languagetool.synthesis.en.EnglishSynthesizer

Thank you.

And please let me know, in which java file you are generating the final json object to return.