/borrowing

Primary LanguageRubyGNU Affero General Public License v3.0AGPL-3.0

Borrowing

Borrowing¹ is a library which exposes the functionality of Wizzard, a spell-checking and -correcting server. Borrowing was written for the s3-e1 exercise of Ruby Mendicant University.

¹ obviously

usage

require 'borrowing'
uri = 'localhost:9292'
Borrowing.new(uri).dicts                     #=> ['en', 'en_CA', 'en_GB', 'en_US']
checker = Borrowing.new(uri, 'en_GB')
checker.check 'colour'                       #=> true
checker.check 'color'                        #=> false
checker.errors 'a dubiosly colored fox'      #=> ['dubiosly', 'colored']
checker.autocorrect 'a dubiosly colored fox' #=> 'a dubiously coloured fox'
checker.suggest 'rewolutionary'              #=> ['revolutionary', 'evolutionary', 'reflationary', "revolutionary's"]

© MMX-MMXI Piotr Szotkowski chastell@chastell.net, licensed under AGPL 3 (see LICENCE)