Run spell and grammar checks on a document.

1. Usage

uniword spellcheck check FILE [OPTIONS]

2. Options

--language

Dictionary language (default: en_US). Examples: en_GB, fr_FR, de_DE.

--dictionary

Custom dictionary file path (reserved for future use).

--json

Output results as JSON.

--verbose, -v

Show suggestions for misspellings and context for grammar issues.

3. Examples

Check a document:

uniword spellcheck check document.docx

British English:

uniword spellcheck check document.docx --language en_GB

JSON output:

uniword spellcheck check document.docx --json

Verbose with suggestions:

uniword spellcheck check document.docx --verbose

4. Checks performed

Spell checking

Word-by-word analysis using hunspell. Reports misspellings with position and suggestions.

Grammar checking

Built-in rules detect double spaces, repeated words, and missing capitalization at sentence starts.

5. Exit codes

0

No issues found (clean document)

1

Issues found

6. Ruby API

doc = Uniword.load("document.docx")

result = doc.spellcheck
puts result.issue_count
puts result.clean?

# Specific language
result = doc.spellcheck(language: "en_GB")