forked from changjenyin/DNN_HMM_RNN_speech
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdel_curve.py
31 lines (29 loc) · 784 Bytes
/
del_curve.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
inf = open('sentences_bad.txt', 'U')
outf = open('sentences.txt', 'w')
for line in inf:
line = line.strip().split(' ')
sen = []
for word in line:
if word == 'use~':
word = 'use'
elif word == 'i\'':
word = 'i'
elif word == 'he\'':
word = 'he'
elif word == '\'all':
word = 'all'
elif word == 'boat\'':
word = 'boat'
elif word == 'live~':
word = 'live'
elif word == 'earth\'':
word = 'earth'
elif word == 'she\'':
word = 'she'
elif word == 'we\'':
word = 'we'
elif word == 'read~v_pres':
continue
sen.append(word)
sen = ' '.join(sen)
outf.write(sen + '\n')