Spaces:
Sleeping
Sleeping
File size: 255 Bytes
5a2da96 |
1 2 3 4 5 6 7 8 |
import language_tool_python
tool = language_tool_python.LanguageToolPublicAPI('en-US')
def correct_grammar(text: str) -> str:
matches = tool.check(text)
corrected_text = language_tool_python.utils.correct(text, matches)
return corrected_text |