Exemplo n.º 1
0
def getConfPaperNum():
    """统计每个会议收录了多少论文。

    格式:会议名-->收录论文数
    """
    index = 0
    with open(OUTPUT_STATISTIC_CONF_PAPER_NUM, 'w') as fileWriter:
        mRedis = RedisHelper()
        confPaperNum = dict()
        conferences =mRedis.getAllConfs()
        for conf in conferences:
            index += 1
            logging.info(str(index) + '--' + conf)
            paperNum = len(mRedis.getConfPapers(conf))
            tmp = confPaperNum.setdefault(paperNum, 0)
            confPaperNum[paperNum] = tmp + 1
        for paperNum, confNum in confPaperNum.items():
            fileWriter.write(str(paperNum) + '\t' + str(confNum) + '\n')
    fileWriter.close()
Exemplo n.º 2
0
def getConfPaperNum():
    """统计每个会议收录了多少论文。

    格式:会议名-->收录论文数
    """
    index = 0
    with open(OUTPUT_STATISTIC_CONF_PAPER_NUM, 'w') as fileWriter:
        mRedis = RedisHelper()
        confPaperNum = dict()
        conferences = mRedis.getAllConfs()
        for conf in conferences:
            index += 1
            logging.info(str(index) + '--' + conf)
            paperNum = len(mRedis.getConfPapers(conf))
            tmp = confPaperNum.setdefault(paperNum, 0)
            confPaperNum[paperNum] = tmp + 1
        for paperNum, confNum in confPaperNum.items():
            fileWriter.write(str(paperNum) + '\t' + str(confNum) + '\n')
    fileWriter.close()