COVID19开放式研究数据集

请升级到MicrosoftEdge以使用最新的功能、安全更新和技术支持。

这一数据集可以动员研究人员应用自然语言处理方面的最新进展,得出新的见解,支持抗击这一传染性疾病。

注意

Microsoft按“原样”提供Azure开放数据集。Microsoft对数据集的使用不提供任何担保(明示或暗示)、保证或条件。在当地法律允许的范围内,Microsoft对使用数据集而导致的任何损害或损失不承担任何责任,包括直接、必然、特殊、间接、偶发或惩罚性损害或损失。

此数据集是根据Microsoft接收源数据的原始条款提供的。数据集可能包含来自Microsoft的数据。

在出版物或再分发的资料中包含CORD-19数据时,请按如下方式引用数据集:

在参考文献中:

在文本中:(新冠肺炎,2020年)

若有关于此数据集的任何疑问,请联系partnerships@allenai.org。

此笔记本有两个目标:

依赖项:此笔记本需要以下库:

CORD-19数据存储在covid19temp容器中。下面是容器中的文件结构以及示例文件。

CORD-19数据集附带一个metadata.csv,这个文件会记录有关CORD-19数据集中提供的所有论文的基本信息。建议从这里开始探索!

#containerhousingCORD-19datacontainer_name="covid19temp"#downloadmetadata.csvmetadata_filename='metadata.csv'blob_service.get_blob_to_path(container_name=container_name,blob_name=metadata_filename,file_path=metadata_filename)importpandasaspd#readmetadata.csvintoadataframemetadata_filename='metadata.csv'metadata=pd.read_csv(metadata_filename)metadata.head(3)粗略看一下会发现内容太多了,所以我们来稍微精简一下。

#choosearandomexamplewithpdfparseavailablemetadata_with_pdf_parse=metadata[metadata['has_pdf_parse']]example_entry=metadata_with_pdf_parse.iloc[42]#constructpathtoblobcontainingfulltextblob_name='{0}/pdf_json/{1}.json'.format(example_entry['full_text_file'],example_entry['sha'])#notetherepetitioninthepathprint("Fulltextblobforthisentry:")print(blob_name)现在,我们可以读取与此blob关联的JSON内容,如下所示。

importjsonblob_as_json_string=blob_service.get_blob_to_text(container_name=container_name,blob_name=blob_name)data=json.loads(blob_as_json_string.content)#inadditiontothebodytext,themetadataisalsostoredwithintheindividualjsonfilesprint("Keyswithindata:",','.join(data.keys()))在本例中,我们感兴趣的是body_text,它按如下方式存储文本数据:

fromnltk.tokenizeimportsent_tokenize#thetextitselflivesunder'body_text'text=data['body_text']#manyNLPtasksplaynicelywithalistofsentencessentences=[]forparagraphintext:sentences.extend(sent_tokenize(paragraph['text']))print("Anexamplesentence:",sentences[0])PDF与PMCXML分析在上面的示例中,我们看到了一个使用has_pdf_parse==True的示例。其中,blob文件路径采用了如下格式:

'/pdf_json/.json'或者,对于使用has_pmc_xml_parse==True的示例,使用了以下格式:

'/pmc_json/.xml.json'例如:

#getandsortlistofavailableblobsblobs=blob_service.list_blobs(container_name)sorted_blobs=sorted(list(blobs),key=lambdae:e.name,reverse=True)现在,我们可以直接循环访问blob。例如,让我们来计算可用的JSON文件数。

#wecannowiteratedirectlythoughtheblobscount=0forblobinsorted_blobs:ifblob.name[-5:]==".json":count+=1print("Thereare{}manyjsonfiles".format(count))Thereare59784manyjsonfiles附录数据质量问题这是一个大型数据集,由于明显的原因,它在仓促的情况下被放在一起!下面是我们观察到的一些数据质量问题。

我们观察到,在某些情况下,给定条目有多个sha。

metadata_multiple_shas=metadata[metadata['sha'].str.len()>40]print("Thereare{}manyentrieswithmultipleshas".format(len(metadata_multiple_shas)))metadata_multiple_shas.head(3)Thereare1999manyentrieswithmultipleshas容器的布局在这里,我们使用简单的正则表达式来浏览容器的文件结构,以防将来更新。

如果NLTK没有punkt包,则需要运行:

使用mount.start()和mount.stop(),或者也可以使用withmount():来管理上下文。

importosCOVID_DIR='/covid19temp'path=mount.mount_point+COVID_DIRwithmount:print(os.listdir(path))['antiviral_with_properties_compressed.sdf','biorxiv_medrxiv','biorxiv_medrxiv_compressed.tar.gz','comm_use_subset','comm_use_subset_compressed.tar.gz','custom_license','custom_license_compressed.tar.gz','metadata.csv','noncomm_use_subset','noncomm_use_subset_compressed.tar.gz']下面是CORD-19数据集中的文件结构以及示例文件。

#choosearandomexamplewithpdfparseavailablemetadata_with_pdf_parse=metadata[metadata['has_pdf_parse']]example_entry=metadata_with_pdf_parse.iloc[42]#constructpathtoblobcontainingfulltextfilepath='{0}/{1}/pdf_json/{2}.json'.format(path,example_entry['full_text_file'],example_entry['sha'])print("Fulltextfilepath:")print(filepath)现在,我们可以读取与此文件关联的JSON内容,如下所示。

importjsontry:withopen(filepath,'r')asf:data=json.load(f)exceptFileNotFoundErrorase:#incasethemountcontexthasbeenclosedmount.start()withopen(filepath,'r')asf:data=json.load(f)#inadditiontothebodytext,themetadataisalsostoredwithintheindividualjsonfilesprint("Keyswithindata:",','.join(data.keys()))Keyswithindata:paper_id,metadata,abstract,body_text,bib_entries,ref_entries,back_matter在本例中,我们感兴趣的是body_text,它按如下方式存储文本数据:

fromnltk.tokenizeimportsent_tokenize#thetextitselflivesunder'body_text'text=data['body_text']#manyNLPtasksplaynicelywithalistofsentencessentences=[]forparagraphintext:sentences.extend(sent_tokenize(paragraph['text']))print("Anexamplesentence:",sentences[0])PDF与PMCXML分析在上面的示例中,我们看到了一个使用has_pdf_parse==True的示例。其中,文件路径采用如下格式:

#choosearandomexamplewithpmcparseavailablemetadata_with_pmc_parse=metadata[metadata['has_pmc_xml_parse']]example_entry=metadata_with_pmc_parse.iloc[42]#constructpathtoblobcontainingfulltextfilename='{0}/pmc_json/{1}.xml.json'.format(example_entry['full_text_file'],example_entry['pmcid'])#notetherepetitioninthepathprint("Pathtofile:{}\n".format(filename))withopen(mount.mount_point+'/'+COVID_DIR+'/'+filename,'r')asf:data=json.load(f)#thetextitselflivesunder'body_text'text=data['body_text']#manyNLPtasksplaynicelywithalistofsentencessentences=[]forparagraphintext:sentences.extend(sent_tokenize(paragraph['text']))print("Anexamplesentence:",sentences[0])附录数据质量问题这是一个大型数据集,由于明显的原因,它在仓促的情况下被放在一起!下面是我们观察到的一些数据质量问题。

THE END
1.数据资源写论文不知道在哪找数据?这些专题数据库都给你整理好了!1.CCAD(浙大卡特-企研中国涉农研究数据库) 该专题库涵盖新型农业经营主体、涉农市场主体、数字农业、绿色农业、农业生产、农产品研究、乡村研究、三农研究统计数据等研究主题。 2.TFID(浙商大泰隆-企研中国普惠金融数据库) 该专题库涵盖普惠金融服务、普惠金融机构、普惠民营企业、普惠小微主体等研究主题。 https://blog.csdn.net/weixin_55633225/article/details/139069921
2.高效检索的关键科研数据库在现代研究中的应用与挑战随着科学技术的飞速发展,信息量日益增长,科研人员面临着如何快速、准确地获取所需信息的挑战。科研数据库作为一种重要的信息资源工具,对于促进学术交流和知识传播起到了至关重要的作用。本文将探讨科研数据库在现代研究中的应用以及面临的一些挑战。 首先,科研数据库提供了一个集中存储大量学术文献资料的地方,这些文献涵盖https://www.phiyhnlirw.cn/jin-dai-ming-ren-jun-shi/751560.html
3.科学网—如何选择和使用开放获取数据库如今,开放获取数据库方兴未艾。研究人员可以通过开放获取数据库检索论文、期刊、知识库、政策文件、图书、图像等资源。越来越多高校、科研机构和政府机构也在着手构建开放获取数据库,提供免费在线资源。 但如何根据个人需求寻找最合适的开放获取数据库?检索开放获取数据库有什么注意事项?以下内容或许对你有所帮助。 https://blog.sciencenet.cn/home.php?mod=space&uid=3201402&do=blog&id=1417437
4.科研项目统计数据库有哪些帆软数字化转型知识库科研项目统计数据库是指收集、整理和存储各种科研项目信息的数据库,旨在为科研人员、机构和政府部门提供科研项目管理、评估和决策支持。这些数据库通常包含各种科研项目的基本信息,如项目名称、项目负责人、资助机构、研究领域、资助金额、项目进展等内容。 2. 有哪些知名的科研项目统计数据库? https://www.fanruan.com/blog/article/17455/
5.植物研究相关数据库汇总http://bioinf.scri.sari.ac.uk/cgi-bin/plant_snorna/home 植物snoRNA基因数据库 http://bioinformatics.psb.ugent.be/webtools/plantcare/html/ 植物顺式调控元件、增强子和抑制子数据库 http://metacrop.ipk-gatersleben.de 作物代谢途径数据库 http://podb.nibb.ac.jp/Organellome 植物器官研究数据库 httphttps://www.jianshu.com/p/2c909949a521
6.分享几个数据库吧,别再纠结做不做实验拿数据了猪定胜人 重症医学科医师 mimic 怎么提取数据,有教学吗,不胜感激 2022-12-13来自iOSIP浙江浙江 收藏https://www.dxy.cn/bbs/newweb/pc/post/47321516
7.科学数据库按照《国家中长期科学和技术发展规划纲(2006-2020年)》的总体部署和要求,科技部正式启动了蛋白质、纳米研究、量子调控、发育与生殖等的四项重大科学研究计划,其中“纳米研究”计划的项目依托单位是国家纳米科学中心。为了加强完善纳米研究项目的实施及相关科学数据的共享,纳米研究专业数据库重点围绕已启动实施的四十余项纳米http://www.nano.csdb.cn/
8.上市公司数据行业数据价格数据中商产业研究院数据库宏观数据,产量数据,销量数据,上市公司数据,行业数据,价格数据,中商产业研究院数据库https://s.askci.com/