def readOddNumFile(raw_file, out, category): for paper in odd.parse_odd_file(raw_file): paper_info = '\t'.join([category, getRelevanceOfOdd(paper), paper['TI'], paper['PMID'], paper['TA'], paper['DP'].split()[0]]) + '\n' out.write(paper_info)
def readOddNumFile(raw_file, out, category): for paper in odd.parse_odd_file(raw_file): paper_info = '\t'.join([ category, getRelevanceOfOdd(paper), paper['TI'], paper['PMID'], paper['TA'], paper['DP'].split()[0] ]) + '\n' out.write(paper_info)
def writeOddAbstracts(raw_file, out, category): for paper in odd.parse_odd_file(raw_file): abstract = 'NA' if 'AB' in paper: abstract = paper['AB'] abstract = abstract.replace('\n', ' ') paper_info = '\t'.join([ category, getRelevanceOfOdd(paper), paper['PMID'], abstract ]) + '\n' out.write(paper_info)
def writeOddAbstracts(raw_file, out, category): for paper in odd.parse_odd_file(raw_file): abstract = 'NA' if 'AB' in paper: abstract = paper['AB'] abstract = abstract.replace('\n', ' ') paper_info = '\t'.join( [category, getRelevanceOfOdd(paper), paper['PMID'], abstract]) + '\n' out.write(paper_info)