Add CSV to Pipe delimited. Add corpus texts

This commit is contained in:
2026-04-06 09:58:32 -04:00
parent 535e07a61c
commit 2e3dd2fff0
7 changed files with 10304 additions and 4 deletions

18
CSVToPipeDelimted.py Normal file
View File

@@ -0,0 +1,18 @@
import csv
# Converts a CSV file to | delimted
# use for incorporating data into RAG system
input_file = "input.csv"
output_file = "output.txt"
with open(input_file, newline='', encoding='utf-8') as csvfile, \
open(output_file, 'w', newline='', encoding='utf-8') as outfile:
reader = csv.reader(csvfile)
writer = csv.writer(outfile, delimiter='|')
for row in reader:
writer.writerow(row)
print("Conversion complete.")