You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't get the basic hello world example to work, maybe I'm just being dense? Can you please document how to use this library for the simple use case of correcting a word that is misspelled?
import (
"fmt"
"github.com/client9/misspell"
)
func main() {
fmt.Println("hello")
r := misspell.New()
result, diffs := r.Replace("whlie")
fmt.Println(result)
fmt.Println(diffs)
for _, d := range diffs {
fmt.Println(d)
}
}
Results:
hello
whlie
[]
The text was updated successfully, but these errors were encountered:
Just realized that the rule of "whlie" -> "while" is not in this library, so perhaps this is "working as intended"? The above code works with "langauge" -> "language"
This seems like a bit of a miss from this library (i.e. shouldn't mispellings one or two edit distance away be picked up as misspellings?) I can do this on my own of course, but I'd prefer this library do it for me...
I can't get the basic hello world example to work, maybe I'm just being dense? Can you please document how to use this library for the simple use case of correcting a word that is misspelled?
Results:
The text was updated successfully, but these errors were encountered: