stewartmcgown / grammarly-api Goto Github PK
View Code? Open in Web Editor NEW๐ Unofficial TypeScript client for the Grammarly API
License: MIT License
๐ Unofficial TypeScript client for the Grammarly API
License: MIT License
Normally, queries take at least 3 seconds to process. Is this Grammarly's fault? Is there any way to improve this?
Hi,
I am facing the issue of inconsistent highlightBegin/highlightEnd values:
Sample sentence:
It is good that she have come.
Response from stewartmcgown@grammarly-api (one request):
https://gist.github.com/lexx888/11c83c06395866ce7c3c4183d3621297
has:
"highlightBegin": 19,
"highlightEnd": 23,
Response from Grammarly demo document (pasted as one sentence, not typed):
https://gist.github.com/lexx888/a115013c9acbc126dbeab2ea0cf41824
has:
"highlightBegin": 20,
"highlightEnd": 24,
see:
And it should be 20 to 24:
"It is good that she have come.\n".substring(20,24)
> "have"
This problem consistently arises in almost any texts with 2 or more mistakes, and it seems that the highlight region is shifted differently in different cases.
Any ideas why this might happen?
A nice feature would be the addition of an async generator API, where consumers could read corrections as soon as they are processed.
This would require a generator wrapper around the web socket.
According to the response object, the default dialect is British English. Is there a way to change it to American, and if so, how?
As the title, the detailed error is as follows
throw new Error('Unable to create a session with these credentials.');
^
Error: Unable to create a session with these credentials.
at Object.<anonymous> (E:\***\node_modules\@stewartmcgown\grammarly-api\build\lib\auth.js:138:19)
at Generator.next (<anonymous>)
at fulfilled (E:\***\node_modules\@stewartmcgown\grammarly-api\build\lib\auth.js:4:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
The reason for this error is that too many websockets have been established, has it been officially disabled by Grammarly?
Cheers for the excellent work here. Has made interfacing with Grammarly a breeze.
In the README, it indicates that dialect
is an optional param to analyze
, but I can't seem to get different results when I pass in "american"
.
Interacting with the web browser, I have no corrections for the word yogurt
. But through the API, where it seems the dialect is "british"
, I get corrections for yogurt
to be yoghurt
instead.
Any chance I'm doing something wrong with the API? My call looks like this.
results = await premium.analyse(sentence, 5000, "american");
You should be able to simply pass in credentials for Premium and get access to premium alerts.
I am a seasoned PHP developer and have absolutely no idea how node projects run. Can you please provide steps/instructions about how I can run this project after cloning it. I did npm run build and I see
nps is executing `build` : nps build.prebuild && tsc -p tsconfig.build.json
nps is executing `build.prebuild` : node node_modules/rimraf/bin.js ./build
What's after this? How do I actually see the errors or the error object?
Also, does this project still run as tests are failing
StringObject interface from utils.d.ts cannot be found when installing this API through npm.
Error Message when building the first usage example from the readme file.
node_modules/@stewartmcgown/grammarly-api/build/lib/connection.d.ts:4:34 - error TS2304: Cannot find name 'StringObject'.
4 export interface Headers extends StringObject {
node_modules/@stewartmcgown/grammarly-api/build/lib/responses.d.ts:46:23 - error TS2304: Cannot find name 'StringObject'.
46 extra_properties: StringObject;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.