|
|
|
@ -25,6 +25,7 @@ var topEnglishWords = []string{ |
|
|
|
|
|
|
|
|
|
|
|
func main() { |
|
|
|
func main() { |
|
|
|
dbPtr := flag.String("db", "./english_words.db", "SQLite3 DB file to use") |
|
|
|
dbPtr := flag.String("db", "./english_words.db", "SQLite3 DB file to use") |
|
|
|
|
|
|
|
dictFilePtr := flag.String("dict", "./rnd-english", "Dictionary file to use") |
|
|
|
flag.Parse() |
|
|
|
flag.Parse() |
|
|
|
|
|
|
|
|
|
|
|
// Randomize high Freq. words
|
|
|
|
// Randomize high Freq. words
|
|
|
|
@ -67,9 +68,8 @@ func main() { |
|
|
|
|
|
|
|
|
|
|
|
fmt.Println("Top English words inserted into the database.") |
|
|
|
fmt.Println("Top English words inserted into the database.") |
|
|
|
|
|
|
|
|
|
|
|
// Read the contents of the american-english file
|
|
|
|
// Read the contents of the shuf american-english file
|
|
|
|
filePath := "./rnd-english" |
|
|
|
content, err := ioutil.ReadFile(*dictFilePtr) |
|
|
|
content, err := ioutil.ReadFile(filePath) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
log.Fatal(err) |
|
|
|
log.Fatal(err) |
|
|
|
} |
|
|
|
} |
|
|
|
|