Skip to content

mostafa-asg/SpellChecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

It uses BK-Tree to find out misspell words.In the resource folder, there is a file of correct words.You can use it as a database of words.

Usage (load correct words from a file) :

 val spellChecker = SpellChecker.Builder.loadFromFile("words.txt").build()
 println( spellChecker.suggest("worlt",1) )

you can also add words manually using load method :

val spellChecker = SpellChecker.Builder.load("world","word","work","workshop").build()
println( spellChecker.suggest("worlt",1) )

Also in Program.kt you can find sample usage.