Julia grammar checker quickstart
Send text to the edits endpoint. Sapling returns suggested replacements with character offsets so your application can review or apply each correction.
No language-specific SDK is required. The example uses a standard or commonly used HTTP client to call Sapling's JSON API.
Julia
/api/v1/edits
using HTTP
using JSON
url = "https://api.sapling.ai/api/v1/edits"
params = Dict(
"key" => "API_KEY"
"text" => "Lets get started!"
"session_id" => "Test Document UUIDS"
)
r = HTTP.request("POST", url,
["Content-Type" => "application/json"],
JSON.json(params))
b = String(r.body)
Example response
application/json
{
"edits": [
{
"start": 0,
"end": 4,
"replacement": "Let's",
"sentence": "Lets get started!",
"error_type": "R:OTHER"
}
]
}
Each edit identifies the source range and replacement text. Preserve the original offsets when applying more than one edit.
About Julia
Julia is a popular programming language for data science applications in industry and academia like numerical analysis and computational science. It is designed to be dynamic, concurrent/parallel and includes efficient libraries for linear algebra and floating-point calculations.