Sapling Python Client
Project description
Sapling Python Client
Python wrapper for the Sapling.ai API.
Try out a grammar check demo. Compare against grammar checking tools and APIs like Grammarly (Grammerly), LanguageTool, ProWritingAid and Ginger.
Functionality
Sapling is an AI messaging assistant. The API currently offers spelling and grammar checking endpoints.
Benefits include:
- 60% more grammar corrections: compared to other systems at similar accuracy using state-of-the-art machine learning systems for natural language processing.
- Low Latency: Achieve the same real-time performance that users of Sapling's own interface experience.
- Over 20 error types: Error categories such as preposition, noun form, and verb tense, including both high-level and fine-grained error information.
- Custom Models: Get corrections and edits tuned to the domain of your text—for example academic writing vs. subtitles.
- Enterprise Security: Ask us about our no data retention policies, self-hosted/on-premises deployment options, and other cybersecurity policies and procedures.
- Rich Text Editor Support: TinyMCE, CKEditor, QuillJS, Trix, ProseMirror, WordPress, Draft.js, Froala, Lexical and others. Consider using Sapling's JavaScript SDK for displaying the API's outputs on webpage editors.
Installation
Install the sapling-py
package with pip
python -m pip install sapling-py
Documentation
Documentation for the client is available at Read the Docs and documentation for the HTTP API is available at Sapling.ai.
Quickstart
- Register for an account at Sapling.ai.
- After registering and signing in, generate a development API key in your dashboard.
- Install the Python client by following the installation steps above.
from sapling import SaplingClient
API_KEY = '<YOUR_API_KEY>'
client = SaplingClient(api_key=API_KEY)
edits = client.edits('Lets get started!', session_id='test_session')
The result should be an array of edits of this form:
[{
"id": "aa5ee291-a073-5146-8ebc-c9c899d01278",
"sentence": "Lets get started!",
"sentence_start": 0,
"start": 0,
"end": 4,
"replacement": "Let's",
"error_type": "R:OTHER",
"general_error_type": "Other",
}]
Get a production key by following this documentation.
Here's some more information on request options and response structure.
License
Copyright 2022 Sapling Intelligence, Inc.
Licensed under the Apache License, Version 2.0.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file sapling-py-4.0.1.tar.gz
.
File metadata
- Download URL: sapling-py-4.0.1.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c06d4b50eef6e1cc70378b5fd1d07882983717c34c158ae96d8c0a0a4ec3d98 |
|
MD5 | bf95eaf6b00e208575026893cb721536 |
|
BLAKE2b-256 | 33164d67be3a3a7f78292d2ea88805054af5f7b16db76bd1e43eaf4a5039e6d2 |