Datasets:
Xabi Ezpeleta
commited on
Commit
•
f918b3b
1
Parent(s):
faa7446
Add english-basque dictionary
Browse files
eng-eus/dictionary.en-eu.en
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:634f1690a6cb7dc29cc8a03a3a957b2d867dde45ec8993e77e89bcfdd9785427
|
3 |
+
size 166923
|
eng-eus/dictionary.en-eu.eu
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a513ab5d871e936e18ce45eb2675ad0acb6607cbd95fd75ff89da233f72704df
|
3 |
+
size 176498
|
eng-eus/english_basque_dictionary/english_basque_dictionary.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
eng-eus/english_basque_dictionary/split_dictionary.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Open the original file for reading
|
2 |
+
with open('english_basque_dictionary.txt', 'r', encoding='utf-8') as file:
|
3 |
+
lines = file.readlines()
|
4 |
+
|
5 |
+
# Create two new files for writing
|
6 |
+
with open('dictionary.en-eu.en', 'w', encoding='utf-8') as english_file, \
|
7 |
+
open('dictionary.en-eu.eu', 'w', encoding='utf-8') as basque_file:
|
8 |
+
|
9 |
+
# Iterate through each line in the original file
|
10 |
+
for line in lines:
|
11 |
+
# Split the line into English word and Basque translation
|
12 |
+
english, basque = line.strip().split('\t')
|
13 |
+
|
14 |
+
# Write the English word to the English file
|
15 |
+
english_file.write(english + '\n')
|
16 |
+
|
17 |
+
# Write the Basque translation to the Basque file
|
18 |
+
basque_file.write(basque + '\n')
|
19 |
+
|
20 |
+
print("Files separated successfully!")
|