File size: 3,799 Bytes
b117e30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211


---

# IELTS Writing Evaluator API

Grammar correction + writing evaluation API for IELTS Writing and letters.

Base URL

```
https://你的用户名-你的space名.hf.space
```

例如:

```
https://shuangshi-ielts-grammar-trial.hf.space
```

---

# Endpoint

Evaluate writing

```
POST /call/evaluate
```

说明:

Evaluate IELTS writing or letter text.
Returns grammar correction, grammar score, coherence score and suggestions.

---

# Request

Content-Type

```
application/json
```

Body

```json
{
  "data": [
    "Your IELTS writing text here"
  ]
}
```

说明:

| Field   | Type   | Description        |
| ------- | ------ | ------------------ |
| data[0] | string | IELTS writing text |

---

# Example Request (curl)

```bash
curl -X POST https://你的用户名-你的space名.hf.space/call/evaluate \
-H "Content-Type: application/json" \
-d '{"data":["I think university student should learn practical skill because it help their future job."]}'
```

---

# Example Request (Python)

```python
from gradio_client import Client

client = Client("你的用户名/你的space名")

result = client.predict(
    "I think university student should learn practical skill because it help their future job.",
    api_name="/evaluate"
)

print(result)
```

---

# Response

示例返回:

```json
{
  "original_text": "I think university student should learn practical skill because it help their future job.",
  "corrected_text": "I think university students should learn practical skills because it helps their future jobs.",
  "grammar_score": 6.0,
  "coherence_score": 6.5,
  "suggestions": [
    "Revise grammar carefully. There are noticeable language errors.",
    "Add more linking words to improve flow."
  ]
}
```

---

# Response Fields

| Field           | Type         | Description                     |
| --------------- | ------------ | ------------------------------- |
| original_text   | string       | Original input text             |
| corrected_text  | string       | Grammar corrected version       |
| grammar_score   | float        | Estimated grammar score (0-9)   |
| coherence_score | float        | Estimated coherence score (0-9) |
| suggestions     | list[string] | Writing improvement suggestions |

---

# Score Meaning

Grammar Score

| Score | Meaning                   |
| ----- | ------------------------- |
| 8-9   | Very few grammar errors   |
| 6-7   | Some grammar issues       |
| 4-5   | Frequent grammar problems |
| <4    | Major grammar errors      |

Coherence Score

| Score | Meaning                              |
| ----- | ------------------------------------ |
| 7-8   | Good paragraph structure and linking |
| 6     | Basic logical structure              |
| 4-5   | Weak organization                    |

Note:

Scores are **heuristic estimates**, not official IELTS band scores.

---

# Limits (当前版本)

| Limit           | Value              |
| --------------- | ------------------ |
| Max text length | ~1000 words        |
| Response time   | 3-15 seconds       |
| Auth            | None (public demo) |

---

# Error Response

Example

```json
{
  "error": "Input cannot be empty."
}
```

---

# Recommended Usage

Suitable for:

* IELTS writing practice apps
* English learning apps
* Grammar correction tools
* Writing assistant tools

Not suitable for:

* official IELTS scoring
* high-stakes evaluation

---

# 下一步建议

你现在这个 API 文档已经 **够 MVP 产品用了**。

但如果你准备做一个 **真正的 IELTS Writing App**,我强烈建议下一步升级 API:

增加:

```
task_response_score
lexical_score
overall_band
```

最终变成:

```
overall_band
grammar_score
coherence_score
lexical_score
task_response_score
```

这就和 IELTS 的评分维度基本一致。