Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pip install language-tool-python
- import language_tool_python
- mytext = """ # would be our text block
- I is testng grammar tool using python. It does not costt anythng.
- """
- def grammarCorrector(text):
- tool = language_tool_python.LanguageTool('en-US')
- result = tool.correct(text)
- return result
- output_data = grammarCorrector(mytext) # corrected result is stored here
- print(output_data)
Advertisement
Add Comment
Please, Sign In to add comment