func writeCSV(fileName string, folderName string, cnjRows []Classifier.FinalData) error {
	var rows [][]string

	rows = append(rows, generateHeaders())

	for _, cnj := range cnjRows {
		rows = append(rows, generateRow(cnj))
	}

	cf, err := createFile(folderName + "/" + fileName + ".csv")
	if err != nil {
		return err
	}

	defer cf.Close()

	w := csv.NewWriter(cf)

	err = w.WriteAll(rows)
	if err != nil {
		return err
	}

	return nil
}
//writeCSV exports a csv to a given folder, with a given name from a collection of LegalDocument
writeCSV exports a csv to a given folder, with a given name from a collection of LegalDocument
// writeCSV exports a csv to a given folder with a given name from a collection of LegalDocument
func writeCSV(fileName string, folderName string, cnjRows []Classifier.FinalData) error {
	var rows [][]string
	rows = append(rows, generateHeaders())
	for _, cnj := range cnjRows {
		rows = append(rows, generateRow(cnj))
	}
	cf, err := createFile(folderName + "/" + fileName + ".csv")
	if err != nil {
		return err
	}
	defer cf.Close()
	w := csv.NewWriter(cf)
	err = w.WriteAll(rows)
	if err != nil {
		return err
	}
	return nil
}
func writeCSV ( fileName string , folderName string , cnjRows [ ] Classifier . FinalData ) error { var rows [ ] [ ] string rows = append ( rows , generateHeaders ( ) ) for _ , cnj := range cnjRows { rows = append ( rows , generateRow ( cnj ) ) } cf , err := createFile ( folderName + " " + fileName + " " ) if err != nil { return err } defer cf . Close ( ) w := csv . NewWriter ( cf ) err = w . WriteAll ( rows ) if err != nil { return err } return nil }
writeCSV exports a csv to a given folder, with a given name from a collection of LegalDocument
writeCSV exports a csv to a given folder with a given name from a collection of LegalDocument