项目作者: johnjago

项目描述 :
Basic English spelling correction
高级语言: Go
项目地址: git://github.com/johnjago/spella.git
创建时间: 2021-04-19T16:19:18Z
项目社区:https://github.com/johnjago/spella

开源协议:MIT License

下载


spella

spella provides basic English spelling correction.

You give it a word and it’ll suggest a correction if it’s spelled wrong.

  1. $ go run main.go testerr
  2. Did you mean tester?

If it’s spelled right, it will tell you that as well.

  1. $ go run main.go tester
  2. Correct

Why

I wanted to implement this same example
in Go to see how different it would be from the Clojure implementation. The two
biggest takeaways are that it’s about twice the number of lines (since I had
to make my own functions to mimick Clojure’s map
and set), and that the types made
it much easier to recall what a function does, only by looking at its signature,
after I returned to this small project after over a week. I’ll be writing a blog
post soon with more detailed observations.