Created
October 22, 2014 10:47
-
-
Save amkatrutsa/ee6593a00fcca165ae78 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
| def process_line(line, t2i, i2t, outfile): | |
| ''' | |
| Find all person's ID, They have to link to the category | |
| 'Living_people' | |
| ''' | |
| pattern = "\((\d+),'(.*?)',(.*?)\)" | |
| current_page = None | |
| for match in finditer(pattern, line): | |
| topage, category, t = match.groups() | |
| if category == "Living_people": | |
| outfile.write(topage) | |
| outfile.write('\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment