Skip to content

Commit a3e2638

Browse files
committed
Add docs
1 parent a0c9fce commit a3e2638

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1-
# spellchecker-web
1+
# spellchecker-web
2+
3+
`spellchecker-web` is a Go-based ready-to-use spellchecker web service. It leverages [f1monkey/spellchecker](https://github.com/f1monkey/spellchecker) as its core for spell checking and correction, supports multiple dictionaries and has an autosave feature.
4+
5+
## Configuration
6+
7+
Before running the service, set the following environment variables:
8+
9+
|Variable | Description | Example |
10+
|----------------|------------- |---------|
11+
|SPELLCHECKER_DIR| Directory to store dictionaries | /tmp/spellchecker |
12+
|SPELLCHECKER_AUTOSAVE_INTERVAL| Auto-save interval (Go time.Duration) | 5m |
13+
|HTTP_ADDR| HTTP server address and port | localhost:8011 |
14+
|LOG_LEVEL| Logging level | info, debug |
15+
16+
## Swagger Docs
17+
18+
The OpenAPI (Swagger) documentation is available at /docs.
19+
20+
## Usage Example
21+
22+
1) Create a dictionary:
23+
24+
```
25+
POST /v1/dictionaries/{code}
26+
Content-Type: application/json
27+
28+
{
29+
"alphabet": "abcdefghijklmnopqrstuvwxyz",
30+
"maxErrors": 2
31+
}
32+
```

0 commit comments

Comments
 (0)