Created
May 13, 2020 12:14
-
-
Save gauravbansal98/d12e1b8af84743c11f3d94fea105c2c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| # load doc into memory | |
| def load_doc(filename): | |
| # open the file as read only | |
| file = open(filename, 'r') | |
| # read all text | |
| text = file.read() | |
| # close the file | |
| file.close() | |
| return text | |
| filename = 'Flickr8k_text/Flickr8k.token.txt' | |
| # load descriptions | |
| doc = load_doc(filename) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment