【python】批量导出IEEE的文献信息为段落文本

8 篇文章 0 订阅
3 篇文章 0 订阅

问题背景:想了解一个领域最近在做些什么,要做一个全面的survey,但是从IEEE导出的.csv文件不是那么方便看。

为了get重要信息(文章名、刊源、摘要),想把这些信息整合到一个方便阅览的文件(.tex)上。

由于相关文献太多,手动操作浪费时间也不是那么实际。

已有从IEEE导出的搜索结果,一个.csv文件。

问题描述:将.csv文件中所关注的信息(我的需求是文章名、刊源、摘要),按照段落格式排列输出到一个.txt文件上

脚本:

# -*- coding: cp936 -*-
#Description: export .txt (title+publication+abstract) from .csv file (full info.)

import os
import csv
 
def col_selector(table,column_key):
    return [row[column_key] for row in table]

path = '.'
file = 'export2021.04.14-02.57.16.csv'
file_path=os.path.join(path,file)
print file_path
with open(file_path, 'rb') as f:
    reader = csv.reader(f, delimiter=',')
    whole_table = [row for row in reader]
    table = whole_table[176:201] # 这里可以修改需要导出的行数
    title_col = col_selector(table, 0) # 文章名的列
    publication_col = col_selector(table, 3) # 刊源的列
    abstract_col = col_selector(table, 10)# 摘要的列

out_path=os.path.join(path, file.split('.')[0]+'_out.txt')
file_write_obj = open(out_path, 'w')
for i in range(0, len(title_col)):
    file_write_obj.writelines('\subsection{['+str(publication_col[i])+'] '+ str(title_col[i])+'}') # 这里是为了方便在latex里新建section,格式可以自行修改
    file_write_obj.write('\n')
    file_write_obj.writelines(str(abstract_col[i]))
    file_write_obj.write('\n')
    file_write_obj.write('\n')
file_write_obj.close()
print "finish"

输出效果:

\subsection{[IEEE Wireless Communications Letters] Robust Cooperative Communication Optimization for Multi-UAV-Aided Vehicular Networks}
Aerial-ground cooperative vehicular networks are envisioned as a novel paradigm in B5G/6G visions. In this letter, the challenge of optimizing the global energy-efficiency (EE) of multi-UAV-aided vehicular networks in the presence of uncertain air-to-ground (A2G) channels is addressed. Specifically, we propose a maximin paradigm to characterize the system, which aims to maximize its global EE meanwhile satisfying Quality-of-Service (QoS)-oriented data rate requirements in the worst-case situation. We theoretically derive a closed-form optimal solution for an embedded minimization subproblem under a parametric channel uncertainty set and thus develop a computationally tractable robust counterpart, which leads to a robust EE optimization design. Simulation results show that the proposed method significantly outperforms conventional EE schemes in terms of achieving higher global system performance and better robustness under random uncertain environments.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值