Zeb commited on
Commit
89e27fb
1 Parent(s): 7813eb4

Clean data again

Browse files
clean/100M/open_subtitles.txt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a44b1b3a9893597b4bc0693bec307573783b9c35a01718502e5b565e2595fce6
3
- size 162139182
 
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:e03a210dcb583c9df4d770ba7c556d7955c7d04f549c4f34b9c42acad8be26ec
3
- size 55180325
 
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 % 10 == 0:
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('&amp;gt;', '')
141
+ new_line = new_line.replace('&amp;lt;i', '')
142
+ new_line = new_line.replace('&amp;lt;/i', '')
143
+ new_line = new_line.replace('&amp;gt;i', '')
144
+ new_line = new_line.replace('&amp;gt;/i', '')
145
+ new_line = new_line.replace('&amp;gt', '')
146
+ new_line = new_line.replace('&amp;lt', '')
147
+ new_line = new_line.replace('&amp;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