Liking cljdoc? Tell your friends :D

symspell-clj

Clojars Project

SymSpell spell checker in Clojure.

This is based on a Java port of the SymSpell spell checker.

Usage

(require '[symspell-clj.core :as sp])

(def sc (sp/new-spellchecker))

;; get a suggested corrected string, you probably want to use this for simple things
(sp/get-suggestion sc "Wht is tht?")
;;==> "What is that?"

;; use functions below if you want to do your own thing

;; spell checking individual word, return suggestions and corresponding edit distances
(sp/lookup sc "wht")
;;==> (["what" 1] ["whit" 1] ["whet" 1])

;; spell checking multiple words, this also does word segmentation
(sp/lookup-compound sc "whereis th elove hehad dated forImuch of thepast who couqdn'tread in sixtgrade and ins pired him")
;;==> (["where is the love he had dated for much of the past who couldn't read in sixth grade and inspired him" 10])

Documentation

Please see API documentation on cljdoc

Status

SymSpell is widely used and ported to many languages. This Clojure library is new, but is already used in production at Juji.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close