xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡介

使用Python語言對DBLP數據集通過sax方式進行簡單處理并存放到csv文件中。處理過程非常簡單,請根據需要進行下載。

資源截圖

代碼片段和文件信息

#?-*-?coding:utf-8?-*-
‘‘‘
@author:Zhong?Peng
@createDate:2015-11-05
@version:1.0.0
‘‘‘
import?sys
from?xml.sax?import?handler?make_parser
import?pickle
import?os

DBLP_xml_PATH?=?r‘C:\Users\zhongpeng\Desktop\dblp.xml‘

#此處需要完整添加所有“塊”結構的標簽,或者需要處理的類型的標簽
paperTag?=?(‘inproceedings‘‘proceedings‘
????????‘incollection‘‘phdthesis‘‘mastersthesis‘‘www‘)



class?CoauthorHandler(handler.ContentHandler):

????def?__init__(self):
????????self.title?=?‘‘
????????self.year?=?‘‘
????????self.author?=?‘‘
????????self.count?=?0
????????self.isPaperTag?=?0
????????self.istitleTag?=?0
????????self.isYearTag?=?0
????????self.isAuthorTag?=?0
????????self.authors?=?[]#存儲每個“塊”中的所有author
????????self.storage?=?{}#用來存儲生成的數據,結構為{‘title‘:[year?[author1?author2?...]]}
??????

評論

共有 條評論