kotoshu-server 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +20 -1
- data/lib/kotoshu/server/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bdf662b103098322c9ebe3d8920a14c23a7226eb60cd16d766db124700498344
|
|
4
|
+
data.tar.gz: 7fc304aa0b161759fcd9d890ce8dce3094ba2108cbe11723e08e0d8b10ce0138
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 68b5e0ff986f50d897b2252202dec9d36341e74856f5a1d5920b5157fedee3ccf6b92a94cd01f4a9ca5e7483fcb47b85c7857055c0c351e1fda951714dae8407
|
|
7
|
+
data.tar.gz: 709e9075d9c2fd78c339cc98515e17e6fc4dff8855b23f95943cc03ce85f02c5a2446d573bd4250541d7a4887051008cf6523378cd0cd5ee4a7960ba0fa8aded
|
data/README.md
CHANGED
|
@@ -74,6 +74,25 @@ the default fluency tier (the full tier is far larger), plus
|
|
|
74
74
|
one-time model load on the first model-enabled request. Listing the
|
|
75
75
|
language in `KOTOSHU_SERVER_MODEL_LANGS` warms it at boot instead.
|
|
76
76
|
|
|
77
|
+
|
|
78
|
+
## Grammar checking (rules, bundled)
|
|
79
|
+
|
|
80
|
+
`POST /v1/check` accepts an optional `"grammar": true` flag. Grammar
|
|
81
|
+
checking is rule-only: the rule tiers bundle with the gem for
|
|
82
|
+
fourteen languages, no setup step and no downloads. The response
|
|
83
|
+
gains `grammar_errors` — each carries the `rule_id`, the character
|
|
84
|
+
`start_offset` and `end_offset`, the `message`, and the
|
|
85
|
+
`suggestions` array.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
curl -X POST http://127.0.0.1:9292/v1/check \
|
|
89
|
+
-H "Content-Type: application/json" \
|
|
90
|
+
-d '{"text": "Das ist der Standart.", "language": "de", "grammar": true}'
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Requires kotoshu >= 1.0.9 (the release that ships the rule tiers);
|
|
94
|
+
on older gems the flag is ignored.
|
|
95
|
+
|
|
77
96
|
## Language detection
|
|
78
97
|
|
|
79
98
|
`POST /v1/detect` reports which engine answered in the `engine`
|
|
@@ -100,7 +119,7 @@ the installed gem — the 0.1.1 behavior, byte for byte.
|
|
|
100
119
|
| `GET` | `/v1/health` | — | `{ status, ready, timestamp }` |
|
|
101
120
|
| `GET` | `/v1/version` | — | `{ server, kotoshu, ruby }` |
|
|
102
121
|
| `GET` | `/v1/languages` | — | `{ cached, supported, model }` |
|
|
103
|
-
| `POST` | `/v1/check` | `{ text, language?, format?, model? }` | `{ file, word_count, errors: [...] }` |
|
|
122
|
+
| `POST` | `/v1/check` | `{ text, language?, format?, model?, grammar? }` | `{ file, word_count, errors: [...], grammar_errors: [...] }` |
|
|
104
123
|
| `POST` | `/v1/suggest` | `{ word, language?, max? }` | `{ word, suggestions: [...] }` |
|
|
105
124
|
| `POST` | `/v1/detect` | `{ text }` | `{ language, confidence, engine }` |
|
|
106
125
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kotoshu-server
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-12-
|
|
11
|
+
date: 2026-12-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: kotoshu
|