Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 i
- 2 want
- 3 to
- 4 go
- 5 home
- 6 .
- 7 i
- 8 love
- 9 cars
- 10 .
- testfile=open("/Users/desktop/testset.txt").read().split('n')
- for line in testfile:
- if not line.strip():
- continue
- index,word= line.split()
- if index == "1":
- testlines.append(sent)
- sent=['<s>', word]
- else:
- if word == '.':
- sent.append('</s>')
- else:
- sent.append(word)
Add Comment
Please, Sign In to add comment