INNER CODE UNIT · Python

get_paper_data

unrealcv/synthetic-computer-vision · src/scholarutil.py:9

def get_paper_data(querier, paper):
    if type(paper) is dict:
        title = paper.get('title')
        cluster_id = paper.get('cluster_id')
    elif type(paper) is str:
        title = paper
    else:
        raise "Input arg paper is of an invalid format %s" % repr(paper)


    if cluster_id:
        print 'Query by cluster_id'
        query = scholar.ClusterScholarQuery(cluster = cluster_id)
    else:
        print 'Query by title "%s"' % title
        query = scholar.SearchScholarQuery()
        query.set_phrase(title)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…