Agent Grammar Checker

An intelligent grammar and style checking interface that provides comprehensive text analysis with issue detection and correction suggestions.

Features

  • Grammar Analysis: Detect grammar, spelling, and punctuation errors
  • Style Suggestions: Improve clarity, tone, and readability
  • Issue Management: Accept or reject individual suggestions
  • Text Statistics: Word count, readability score, and issue tracking
  • Real-time Editing: Live text editing with instant feedback
  • Severity Levels: Error, warning, and info classifications
  • Issue Categories: Grammar, spelling, style, clarity, and punctuation
  • Original Text Comparison: Side-by-side before/after comparison

Examples

Basic Usage

Simple grammar checker with issue detection.

Text analysis complete. Found 3 suggestions for improvement.
156
Words
78/100
Readability
2
Fixed
5
Total Issues
Corrected Text
Suggestions (3)
Grammar
Error

Subject-verb agreement error

Suggestion: The verb should agree with the subject in number
Style
Warning

Consider using a more active voice

Suggestion: Rewrite in active voice for better clarity
Spelling
Error

Possible spelling error

Suggestion: Check the spelling of this word
Original Text
Your original text with some gramatical errors and style issues that need to be fix.
Just now
😊😔

Interactive Demo

Full-featured demo with text analysis and correction tools.

Text analysis complete. Found 4 suggestions for improvement.
156
Words
78/100
Readability
0
Fixed
4
Total Issues
Corrected Text
Suggestions (4)
Spelling
Error

Possible spelling error: 'gramatical' should be 'grammatical'

Suggestion: grammatical
Grammar
Error

Subject-verb agreement: 'need' should be 'needs'

Suggestion: needs
Grammar
Error

Incorrect verb form: 'fix' should be 'fixed'

Suggestion: fixed
Style

Consider using more formal language

Suggestion: Consider rephrasing for better clarity
Original Text
Your original text with some gramatical errors and style issues that need to be fix.
Just now
😊😔

Quick Actions:

Sample Texts:

Status: 4 issues remaining • 0 fixed • 78/100 readability score

Chat Integration

Example of how the grammar checker works within a chat conversation:

Grammar Checking Chat

Showing how the grammar checker works in a chat context

Can you check the grammar in this sentence for me? 'Their going to the store to buy some groceries for there family.'
✍️

I'll analyze your text for grammar and spelling issues.

Text analysis complete. Found 2 suggestions for improvement.
Corrected Text
Suggestions (2)
Grammar
Error

Use 'They're' (they are) instead of 'Their' (possessive)

Suggestion: They're
Spelling
Warning

Use 'their' (possessive) instead of 'there' (location)

Suggestion: their
Just now
😊😔

Installation

npx shadcn add "https://agents-ui-kit.com/c/agent-grammar-checker.json"

API Reference

AgentGrammarChecker

PropTypeDefaultDescription
textstring""Current corrected text
originalTextstring""Original input text
issuesGrammarIssue[][]Array of detected issues
statsGrammarStats-Analysis statistics
isAnalyzingbooleanfalseWhether analysis is in progress
onTextChange(text: string) => void-Text change callback
onAcceptSuggestion(issueId: string) => void-Accept suggestion callback
onRejectSuggestion(issueId: string) => void-Reject suggestion callback
onCopy() => void-Copy text callback
onReanalyze() => void-Re-analyze text callback
onRegenerateResponse() => void-Regenerate callback
classNamestring-Additional CSS classes
timestampstring"Just now"Display timestamp

GrammarIssue

PropertyTypeRequiredDescription
idstringYesUnique issue identifier
typeGrammarIssueTypeYesIssue category
messagestringYesIssue description
suggestionstringYesCorrection suggestion
position{ start: number; end: number }YesText position
severity"error" | "warning" | "info"YesIssue severity level

GrammarIssueType

type GrammarIssueType = "grammar" | "spelling" | "style" | "clarity" | "punctuation"

GrammarStats

PropertyTypeRequiredDescription
wordsCountnumberYesTotal word count
readabilityScorenumberYesReadability score (0-100)
issuesFixednumberYesNumber of fixed issues
totalIssuesnumberYesTotal issues detected

Issue Severity Levels

  • Error: Critical issues that affect correctness
  • Warning: Important style or clarity improvements
  • Info: Minor suggestions for enhancement

Issue Categories

  • Grammar: Subject-verb agreement, tense consistency, etc.
  • Spelling: Misspelled words and typos
  • Style: Word choice, voice, and tone improvements
  • Clarity: Sentence structure and readability
  • Punctuation: Comma usage, capitalization, etc.