Language Checking Error Due To Punctuation.
Opened this issue · 0 comments
kandarpkakkad commented
Language Checking Error Due To Punctuation.
import language_tool_python as ltp import sys text = "Hello How Is You" print(text) tool = ltp.LanguageTool('en-US') matches = tool.check(text) print(matches) corrected_text = tool.correct(text) print(corrected_text)
When the punctuation is not correct, the grammar is not checked correctly.
Without correct punctuation.
Hello How Is You? [] Hello How Is You?
With correct punctuation.
Hello! How Is You? [Match({'ruleId': 'NON3PRS_VERB', 'message': 'The pronoun \'Is\' must be used with "are".', 'replacements': ['Are'], 'context': 'Hello! How Is You?', 'offset': 11, 'errorLength': 2, 'category': 'GRAMMAR', 'ruleIssueType': 'grammar'})] Hello! How Are You?