kurdish-spell-checker
v1.0.3
Published
Check the Kurdish (Kurmanji) words and texts spelling
Downloads
11
Maintainers
Readme
Kurdish-spell-checker
An NPM package to check Kurdish (Kurmanji) texts/words spelling. https://www.npmjs.com/package/kurdish-spell-checker
Features:
- Check full texts to find each word spell checking
- Check if a certain word exists or not
- Check the best match and other matches of a certain word
Usage:
- Install the package:
npm i kurdish-spell-checker
or
yarn add kurdish-spell-checker
- Different ways to use it:
import {exists, findBestMatch, findAllMatches,
checkText, checkTextWithOtherMatches} from 'kurdish-spell-checker'
//Check if word exists
exists("hi") // false
exists("spas") // true
exists("sipas") // false
//Check the best match of a word
await findBestMatch("hi") // { original_word: 'hi', best_match: 'hiş', best_match_rating: 0.6666666666666666, best_match_index: 405, original_word_exists: false}
//Check the best match of a word with other matches too
//will return the best match and also other matches with >= 70% of simillarity
await findAllMatches("dema", 70)
//Check a full text without other matches
//will return an array with object for each word
await checkText("dem demak azadî")
//Check a full text with other matches each word
//will return an array with object for each word
await checkTextWithOtherMatches("dem demak azadî")
Testing:
You can test using mocha:
npm test