spella

command module
v0.0.0-...-7b8d7c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2021 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

spella

spella provides basic English spelling correction.

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

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

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

$ go run main.go tester
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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址