Skip to content

kurd-cc/kurdish-spelling-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  1. Install the package:
npm i kurdish-spell-checker

or

yarn add kurdish-spell-checker

  1. 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

Releases

No releases published

Packages

No packages published