Created
May 21, 2014 11:29
-
-
Save liori/0d7018295c23771d2280 to your computer and use it in GitHub Desktop.
This file contains 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
import csv | |
[…] | |
with open('sentences.csv', 'rb') as fh: | |
reader = csv.reader(fh, [… some options might be necessary …]) | |
# at this point `reader` is an iterator that returns tuples | |
for sentence_id, language, sentence in reader: | |
if language == 'cmn': # for example, let's print all chinese sentences | |
print sentence |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment