Module Expr Str Import alias Import alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str For NameStore Call AttributeLoad NameLoad attr NameLoad body If Call AttributeLoad NameLoad attr Str body AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str Str NameLoad orelse If Call AttributeLoad NameLoad attr Str body AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str Str NameLoad orelse If Call AttributeLoad NameLoad attr Str body AugAssignAdd NameStore Str orelse If Call AttributeLoad NameLoad attr Str body AugAssignAdd NameStore Str orelse AugAssignAdd NameStore NameLoad Assign NameStore Call NameLoad NameLoad Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign NameStore Call AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr Str attr attr Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad With Call NameLoad NameLoad Str NameStore body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad
N/A N/A  clean TREC data files  N/A fileinput N/A re bs4 BeautifulSoup N/A FILE trec_2003.txt N/A OUTFILE trec_2003_cleaned.txt N/A data N/A line N/A N/A fileinput input FILE N/A N/A N/A N/A line startswith <num> N/A N/A data N/A N/A re sub <num> Number: (\d+).* <num>\1</num> line N/A N/A N/A N/A line startswith <type> N/A N/A data N/A N/A re sub <type> Type: (\w+).* <type>\1</type> line N/A N/A N/A N/A line startswith <desc> N/A N/A data <desc> N/A N/A N/A N/A line startswith </top> N/A N/A data </desc></top> N/A N/A data line N/A soup N/A BeautifulSoup data lxml N/A questions N/A N/A tops N/A N/A soup find_all top N/A t tops N/A N/A num N/A N/A N/A t find num string N/A typ N/A N/A N/A t find type string N/A q N/A N/A N/A N/A N/A t find desc string strip N/A N/A N/A questions append N/A num typ q N/A N/A open OUTFILE w out N/A N/A q_line questions N/A N/A N/A N/A out write N/A N/A {0} {1} {2}
 format q_line