Metadata-Version: 2.2
Name: harmoniapy
Version: 1.1.0
Summary: Pure Python spell checker inspired by pyspellchecker
Author-email: Dušan Jolović <jolovic@pm.me>
License: MIT License
        
        Copyright (c) 2025 Dušan Jolović
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/jolovicdev/harmonia
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0

# Harmonia Spell Checker

A fast, (pretty) accurate Python spell checker, inspired by pyspellchecker.

## Installation
```bash
pip install harmoniapy
```

## Features
- Optimized dictionary loading
- Phonetic (Soundex) matching
- Hyphen/quote variation support
- Levenshtein distance-based suggestions
- HTML report generation with hover suggestions

## CLI Usage
```bash
# Show errors
harmonia check file.txt

# Show errors with suggestions
harmonia check file.txt --suggest

# Generate HTML report with hover suggestions
harmonia check file.txt --suggest --html report.html
```

## Python API Usage
```python
from harmonia import Dictionary, check_file

# Initialize dictionary (English only for now)
dictionary = Dictionary()

# Check file with suggestions
errors = check_file("file.txt", dictionary, suggest=True)

# Process errors
for error in errors:
    print(f"Error: {error['word']} at line {error['line']}")
    if error['suggestions']:
        print(f"Suggestions: {', '.join(error['suggestions'])}")

# Generate HTML report
from harmonia.formatters import generate_html_report
with open("file.txt") as f:
    text = f.read()
html_report = generate_html_report(text, errors)
with open("report.html", "w") as f:
    f.write(html_report)
```

## HTML Report
The HTML report shows the text with red underlines for misspelled words. Hover over any underlined word to see spelling suggestions.
