npm.io
1.3.1 • Published 6 years ago

@ipmanlk/subasa-api

Licence
MIT
Version
1.3.1
Deps
1
Size
6 kB
Vulns
1
Weekly
0
Stars
1
DeprecatedThis package is deprecated
Subasa logo

Subasa API

Javascript API for the Subasa Sinhala spell checker

Usage

Download node from nodejs.org and install it, if you haven't already.

Then install subasa-api using npm or yarn.

npm install @ipmanlk/subasa-api --save

Example,

const { correct } = require("@ipmanlk/subasa-api");

const text = "මථකය (ස්මෘතිය) යනු ජීවියෙකු තුළ තොරතුරු ගබඩා කිරීමට සහ ඉන්පසුව එම තොරතුරු ණැවත එලි දැක්වීමට ඇති හැකියාවයි.";

correct(text).then(data => {
    console.log("corrected text: ", data.text);
    console.log("corrections: ", data.corrections);
});

Keywords