Zeb
commited on
Commit
•
89e27fb
1
Parent(s):
7813eb4
Clean data again
Browse files- clean/100M/open_subtitles.txt +2 -2
- clean/100M/qed.txt +2 -2
- clean/100M/switchboard.txt +0 -0
- clean/10M/qed.txt +0 -0
- clean/10M/switchboard.txt +0 -0
- clean/dev/qed.txt +0 -0
- clean/dev/switchboard.txt +0 -0
- clean/test/qed.txt +0 -0
- clean/test/switchboard.txt +0 -0
- clean_data.py +9 -1
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:15ebde7711ac44bf8aaaad41fe6351393fe75c62f9b4672c507576c7c66eb3b3
|
3 |
+
size 162139191
|
clean/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:d632fb2b1c6422333465da35606eb026c2c7e48ea8960aa4ed160cd3a06a6d29
|
3 |
+
size 54976346
|
clean/100M/switchboard.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
clean/10M/qed.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
clean/10M/switchboard.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
clean/dev/qed.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
clean/dev/switchboard.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
clean/test/qed.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
clean/test/switchboard.txt
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
clean_data.py
CHANGED
@@ -137,6 +137,14 @@ def clean_qed(lines):
|
|
137 |
new_line = new_line.replace(' lt', ' it')
|
138 |
new_line = new_line.replace(' lt', ' it')
|
139 |
new_line = new_line.replace(' lv', ' iv')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
|
141 |
# Skip lines that are just character names, e.g. "AMY GOODMAN:"
|
142 |
if len(new_line.strip()) < 1 or (len(words) <= 3 and new_line.strip()[-1] == ':'):
|
@@ -192,7 +200,7 @@ def clean_switchboard(lines):
|
|
192 |
new_line = line.lower().strip()
|
193 |
joined.append(new_line)
|
194 |
count += 1
|
195 |
-
if count %
|
196 |
new_lines.append(" ".join(joined) + '\n')
|
197 |
joined = []
|
198 |
return new_lines
|
|
|
137 |
new_line = new_line.replace(' lt', ' it')
|
138 |
new_line = new_line.replace(' lt', ' it')
|
139 |
new_line = new_line.replace(' lv', ' iv')
|
140 |
+
new_line = new_line.replace('&gt;', '')
|
141 |
+
new_line = new_line.replace('&lt;i', '')
|
142 |
+
new_line = new_line.replace('&lt;/i', '')
|
143 |
+
new_line = new_line.replace('&gt;i', '')
|
144 |
+
new_line = new_line.replace('&gt;/i', '')
|
145 |
+
new_line = new_line.replace('&gt', '')
|
146 |
+
new_line = new_line.replace('&lt', '')
|
147 |
+
new_line = new_line.replace('&amp;', '')
|
148 |
|
149 |
# Skip lines that are just character names, e.g. "AMY GOODMAN:"
|
150 |
if len(new_line.strip()) < 1 or (len(words) <= 3 and new_line.strip()[-1] == ':'):
|
|
|
200 |
new_line = line.lower().strip()
|
201 |
joined.append(new_line)
|
202 |
count += 1
|
203 |
+
if count % 5 == 0:
|
204 |
new_lines.append(" ".join(joined) + '\n')
|
205 |
joined = []
|
206 |
return new_lines
|