apiverve_grammarcheck 1.2.3
apiverve_grammarcheck: ^1.2.3 copied to clipboard
Grammar Check is a grammar checker and spell check API that inspects text for spelling and grammar errors, returning the corrected wording, error count, and a modified flag. Paid plans add detailed ru [...]
Grammar Check API - Dart/Flutter Client #
Grammar Check is a grammar checker and spell check API that inspects text for spelling and grammar errors, returning the corrected wording, error count, and a modified flag. Paid plans add detailed rule descriptions, character offsets, and suggestions for every detected mistake.
This is the Dart/Flutter client for the Grammar Check API.
Installation #
Add this to your pubspec.yaml:
dependencies:
apiverve_grammarcheck: ^1.2.3
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage #
import 'package:apiverve_grammarcheck/apiverve_grammarcheck.dart';
void main() async {
final client = GrammarcheckClient('YOUR_API_KEY');
try {
final response = await client.execute({
'text': 'The the pig snorted when I saw it on the barn gate. I was a little mad becuase it woke up my pupppppy'
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response #
{
"status": "ok",
"error": null,
"data": {
"modified": true,
"corrected": "The pig snorted when I saw it on the barn gate. I was a little mad because it woke up my puppy",
"errorCount": 3,
"corrections": [
{
"rule": "repeated_word",
"message": "Did you mean to repeat the word \"The\"?",
"position": {
"start": 0,
"end": 7
},
"suggestions": [
"The"
]
},
{
"rule": "spelling",
"message": "Did you mean \"because\"?",
"position": {
"start": 67,
"end": 74
},
"suggestions": [
"because"
]
},
{
"rule": "spelling",
"message": "Did you mean \"puppy\"?",
"position": {
"start": 92,
"end": 101
},
"suggestions": [
"puppy"
]
}
]
}
}
API Reference #
- API Home: Grammar Check API
- Documentation: docs.apiverve.com/ref/grammarcheck
Authentication #
All requests require an API key. Get yours at apiverve.com.
License #
MIT License - see LICENSE for details.
Built with Dart for APIVerve