Liking cljdoc? Tell your friends :D

symspell-clj.core

SymSpell Spell checker

SymSpell Spell checker
raw docstring

ISpellCheckercljprotocol

add-wordclj

(add-word this word)

Add a word to the spell checker at run time. It is responsibility of user to persist the added words, pass them to :custom-dictionary when the spellchcker is initialized next time.

Add a word to the spell checker at run time. It is responsibility of user
to persist the added words, pass them to `:custom-dictionary` when the
spellchcker is initialized next time.

get-suggestionclj

(get-suggestion this input)

Return a single spell-checked input. This is a user level function that tries to do the sensible things, such as preserving the cases, dealing with punctuation and numbers.

Return a single spell-checked input. This is a user level function that tries
to do the sensible things, such as preserving the cases, dealing with punctuation
and numbers.

match-prefix?clj

(match-prefix? this input)

Return true if the input matches a prefix in the dictionary

Return true if the input matches a prefix in the dictionary
source

lookupclj

source

lookup-compoundclj

source

new-spellcheckerclj

(new-spellchecker)
(new-spellchecker unigram-file)
(new-spellchecker unigram-file bigram-file)
(new-spellchecker
  unigram-file
  bigram-file
  {:keys [max-edit-distance prefix-length custom-dictionary]
   :or {max-edit-distance 2 prefix-length 10 custom-dictionary []}})

Create a spell checker. Unigram file is relative to the classpath. The file should be plain text, UTF-8 encoded without BOM. Each line contains a word and an optional frequency with a space in between. The default file is a built-in English dictionary. Bigram file is similar, but with two words instead, Bigram file is optional. Possible option map keys are

  • :max-edit-distance is the maximum possible edit distance considered by this spell checker, default 2.
  • :prefix-length is the length of prefix considered by this spell checker, default 10.
  • :custom-dictionary is a vector of additional words for the dictionary.
Create a spell checker.
Unigram file is relative to the classpath. The file should be plain text,
UTF-8 encoded without BOM. Each line contains a word and an optional frequency
with a space in between. The default file is a built-in English dictionary.
Bigram file is similar, but with two words instead, Bigram file is optional.
Possible option map keys are
* `:max-edit-distance` is the maximum possible edit distance considered by
 this spell checker, default 2.
* `:prefix-length` is the length of prefix considered by this spell checker,
 default 10.
* `:custom-dictionary` is a vector of additional words for the dictionary.
sourceraw docstring

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

× close