language-grammar-api

1.1.6 • Public • Published

node.js grammar / language tool api

codecov CircleCI

About

API wrapper for https://languagetool.org/ service (LanguageTool HTTP JSON API)

Install

npm i -S language-grammar-api

Usage

  1. Create client
const LanguageToolApi = require('language-grammar-api');
 
const options = {
  endpoint: 'https://languagetool.org/api/v2'
};
 
const languageToolClient = new LanguageToolApi(options);
  1. Get list of supported languages:
const languages = await languageToolClient.languages();
  1. Check your text for specific language:
const check = await languageToolClient.check({
  text: 'Amazing text to check', // required
  language: 'en-US' // required (you can use .languages call to get language)
});

More details about api: http://wiki.languagetool.org/public-http-api

Package Sidebar

Install

npm i language-grammar-api

Weekly Downloads

10

Version

1.1.6

License

ISC

Unpacked Size

119 kB

Total Files

37

Last publish

Collaborators

  • olegkoval