25 lines
379 B
Go
25 lines
379 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"os"
|
|
"internal/corpus"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println("Creating corpus...")
|
|
f, err := os.OpenFile("./csv/corpus.csv", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
defer f.Close()
|
|
|
|
lines := corpus.MakeCorpus()
|
|
|
|
// Write to file
|
|
for _, line := range lines {
|
|
f.WriteString(line + "\n")
|
|
}
|
|
} |