Closed tbytes closed 12 years ago
DAWG doesn't work with byte now, only rune. Sorry I didn't pay attention.
If you change your line from key := []byte("考察队员") to key := []rune("考察队员") It will work fine.
Line 200 in dawg.go is the key why it doesn't work with byte. It doesn't even compile. You can run gofmt -tabs=false -tabwidth=4 -r='rune /_Keytype/ -> byte /_Keytype/' -w darts.go gofmt -tabs=false -tabwidth=4 -r='rune /_Keytype/ -> byte /_Keytype/' -w dawg.go and then try to compile. Don't have time to fix this right now. I'd very appreciate if you can find a solution.
func main() {
d, err := darts.Import("../src/darts/darts.txt", "darts.lib", true) // fmt.Println(err) if err == nil {
Produces:
input dict length: 109135 build out length 373050 18.472ms [] [Finished in 2.5s]
Without DAWG = True- it works just fine. ??
Just playing with it, interested in Double-Array Trie and DAWG specifically. Thank you.