Skip to content

Language Checking Error Due To Punctuation. #73

Description

@kandarpkakkad

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions