コード例 #1
0
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)
コード例 #2
0
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)
コード例 #3
0
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)
コード例 #4
0
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)