22 lines
416 B
Python
22 lines
416 B
Python
import pandas as pd
|
|
|
|
|
|
europarl = pd.read_csv('news-commentary-v12-clean.tsv', sep='\t', names=['cs', 'en'], header=None)
|
|
|
|
cs = europarl['cs']
|
|
en = europarl['en']
|
|
|
|
file1 = open("./after_split/news-commentary-v12-clean.cs","w")
|
|
for row in cs:
|
|
file1.write(str(row) + "\n")
|
|
file1.close()
|
|
|
|
|
|
file2 = open("./after_split/news-commentary-v12-clean.en","w")
|
|
for row in en:
|
|
file2.write(str(row) + "\n")
|
|
file2.close()
|
|
|
|
|
|
|