Zeb
commited on
Commit
•
a245e72
1
Parent(s):
89e27fb
Strip data
Browse files- BabyLM.py +1 -1
- clean/100M/open_subtitles.txt +2 -2
- tag_data.py +6 -1
- tagged/100M/qed.txt +2 -2
- tagged/100M/switchboard.txt +2 -2
- tagged/10M/qed.txt +2 -2
- tagged/10M/switchboard.txt +0 -0
- tagged/dev/qed.txt +2 -2
- tagged/dev/switchboard.txt +0 -0
- tagged/test/qed.txt +2 -2
- tagged/test/switchboard.txt +0 -0
- tagged_gold/100M/qed.txt +2 -2
- tagged_gold/100M/switchboard.txt +2 -2
- tagged_gold/10M/qed.txt +2 -2
- tagged_gold/10M/switchboard.txt +0 -0
- tagged_gold/dev/qed.txt +2 -2
- tagged_gold/dev/switchboard.txt +0 -0
- tagged_gold/test/qed.txt +2 -2
- tagged_gold/test/switchboard.txt +0 -0
BabyLM.py
CHANGED
@@ -131,7 +131,7 @@ class BabyLM(datasets.GeneratorBasedBuilder):
|
|
131 |
filename = row.strip()
|
132 |
continue
|
133 |
if is_tags:
|
134 |
-
yield global_idx, {"text": text, "tagged_text": row, "filename": filename}
|
135 |
global_idx += 1
|
136 |
is_tags = False
|
137 |
else:
|
|
|
131 |
filename = row.strip()
|
132 |
continue
|
133 |
if is_tags:
|
134 |
+
yield global_idx, {"text": text.strip(), "tagged_text": row.strip(), "filename": filename}
|
135 |
global_idx += 1
|
136 |
is_tags = False
|
137 |
else:
|
clean/100M/open_subtitles.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a44b1b3a9893597b4bc0693bec307573783b9c35a01718502e5b565e2595fce6
|
3 |
+
size 162139182
|
tag_data.py
CHANGED
@@ -106,6 +106,7 @@ def write_tagged_lines(filename, text, tagged_lines):
|
|
106 |
tokenizer = AutoTokenizer.from_pretrained("CamBabyTrainers/BabyBERTa-3-8192-tokenizer")
|
107 |
|
108 |
FOLDERS = ['10M', '100M', 'dev', 'test']
|
|
|
109 |
|
110 |
if __name__ == "__main__":
|
111 |
|
@@ -114,7 +115,7 @@ if __name__ == "__main__":
|
|
114 |
for folder in FOLDERS:
|
115 |
for root, dirs, files in os.walk(f"clean/{folder}"):
|
116 |
for file in files:
|
117 |
-
if file.endswith(".txt"):
|
118 |
all_files.append(os.path.join(root, file))
|
119 |
|
120 |
# Get map from PTB tags to universal tags
|
@@ -150,3 +151,7 @@ if __name__ == "__main__":
|
|
150 |
new_file = file.replace('clean', 'tagged_gold')
|
151 |
os.makedirs(os.path.dirname(new_file), exist_ok=True)
|
152 |
write_tagged_lines(new_file, lines, gold_tagged_lines)
|
|
|
|
|
|
|
|
|
|
106 |
tokenizer = AutoTokenizer.from_pretrained("CamBabyTrainers/BabyBERTa-3-8192-tokenizer")
|
107 |
|
108 |
FOLDERS = ['10M', '100M', 'dev', 'test']
|
109 |
+
FILENAMES = ['qed.txt', 'switchboard.txt']
|
110 |
|
111 |
if __name__ == "__main__":
|
112 |
|
|
|
115 |
for folder in FOLDERS:
|
116 |
for root, dirs, files in os.walk(f"clean/{folder}"):
|
117 |
for file in files:
|
118 |
+
if file.endswith(".txt") and file.split('/')[-1] in FILENAMES:
|
119 |
all_files.append(os.path.join(root, file))
|
120 |
|
121 |
# Get map from PTB tags to universal tags
|
|
|
151 |
new_file = file.replace('clean', 'tagged_gold')
|
152 |
os.makedirs(os.path.dirname(new_file), exist_ok=True)
|
153 |
write_tagged_lines(new_file, lines, gold_tagged_lines)
|
154 |
+
|
155 |
+
|
156 |
+
os.remove('tmp.txt')
|
157 |
+
os.remove('tmp_tagged.txt')
|
tagged/100M/qed.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5bb8331ac5ee04908bad5b87fe873d367d6e2b27dc90d81fd76f23da0ad80357
|
3 |
+
size 285761401
|
tagged/100M/switchboard.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:50d6c3d94fa08d2adc4152af2eecb1881b7dec32b003edfe71a0ff8e4ceb7860
|
3 |
+
size 34572605
|
tagged/10M/qed.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6b92eda693ff3f59fce72387d538945ef859bce739798347f0eaffce0e6ffbdc
|
3 |
+
size 29062685
|
tagged/10M/switchboard.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tagged/dev/qed.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:43bb6072b65b56859f44900162ad049518bba3f84e96a978ffbae7a7222fa1f2
|
3 |
+
size 26965217
|
tagged/dev/switchboard.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tagged/test/qed.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7de66d6908250d7a5024a4bf1150a3e15efb80ead0a447f74aa361dd574c8ecc
|
3 |
+
size 33511376
|
tagged/test/switchboard.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tagged_gold/100M/qed.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c74224a9a9583b0c06a9cb6f8c7aaf4596dc5752994083a646d26c11647a5a53
|
3 |
+
size 285012660
|
tagged_gold/100M/switchboard.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5a01c2f3968709b9975ab77fc1db74be45d00b4c321301f9d4e54f45d98d3005
|
3 |
+
size 34296376
|
tagged_gold/10M/qed.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d52bb038cf8a7228bfcbe515cace993b5136d2f44813243c554cde38c93a1389
|
3 |
+
size 28982300
|
tagged_gold/10M/switchboard.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tagged_gold/dev/qed.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b7222b290d0a6e411a92b7339e48eed99cc8671474732c115ae39a3bf6fda13c
|
3 |
+
size 26899649
|
tagged_gold/dev/switchboard.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tagged_gold/test/qed.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:79103249d1c287537695108b0d5e853128d7248aae130afb432c4c144b1258ab
|
3 |
+
size 33423852
|
tagged_gold/test/switchboard.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|