Skip to content

Ngram text files not properly referenced when used as a library #1

@thaliaarchi

Description

@thaliaarchi

After installing gocipher (via "go get" and "go build"), for it to work, a symlink needs to be created from the ngrams/ dir to the place where the gocipher library is used. This needs to be fixed to not rely on a symlink for portability.

$ go run affinetest.go
panic: error opening file "ngrams/english_1-grams.txt": open ngrams/english_1-grams.txt: no such file or directory

goroutine 1 [running]:
github.com/andrewarchi/gocipher/gocipher.LoadNgrams(0x10de633, 0x7, 0x1, 0x54)
	/Users/kbouley/projects/go/src/github.com/andrewarchi/gocipher/gocipher/ngrams.go:66 +0x9e8
github.com/andrewarchi/gocipher/gocipher.init()
	/Users/kbouley/projects/go/src/github.com/andrewarchi/gocipher/gocipher/ngrams.go:12 +0x425
main.init()
	<autogenerated>:1 +0x50
exit status 2

I was kindly notified of this issue by Kris Boulez.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions