Find a python code and java code that can take a whole sentence and do text analysis by checking the spelling mistakes and show the correct spelling.

I want a python code and java code that can take a whole sentence and do text analysis by checking the spelling mistakes and show the correct spelling.Example:Input: I have a peen. Output:True ITrue haveTrue aFalse peen the correct spelling: pen