资源简介
deep learning (Bengio大作:深度学习)中文版
代码片段和文件信息
#!/usr/bin/env python3
import sys
import re
def create_gls_dict():
term_file = open(‘../terminology.tex‘ ‘r‘)
term_file.readline()
terms = term_file.read()
term_file.close()
term_name_dict = {}
term_symbol_dict = {}
for term in terms.split(‘\n\n‘):
tmp = term.strip().split(‘\n‘)
if tmp[2].strip()[:4] != ‘name‘:
print(tmp)
dirty_term = tmp[0][18:]
term_name_dict[dirty_term[:dirty_term.find(‘}‘)]] = tmp[2].strip()[5:-1]
for s in tmp:
if s.strip()[:6] == ‘symbol‘:
dirty_symbol = s.strip()[8:]
term_symbol_dict[dirty_term[:dirty_term.find(‘}‘)]] = dirty_symbol[:dirty_symbol.find(‘}‘)]
return term_name_dict term_symbol_dict
def replace_single_gls(tex p term_dict):
pl = p.finditer(tex)
new_tex = ‘‘
prev_pos = 0
for i in pl:
new_tex += tex[prev_pos:i.start()] + term_dict[i.group()[i.group().find(‘{‘)+1:-1]]
prev_pos = i.end()
new_tex += tex[prev_pos:]
return new_tex
def replace_all_gls(input_tex term_name_dict term_symbol_dict):
# matched \gls{}
tex_file = open(input_tex ‘r‘)
tex = tex_file.read()
p = re.compile(‘\\\\gls\\{[^\\}]*\\}‘)
tex = replace_single_gls(tex p term_name_dict)
p = re.compile(‘\\\\firstgls\\{[^\\}]*\\}‘)
tex = replace_single_gls(tex p term_name_dict)
p = re.compile(‘\\\\firstall\\{[^\\}]*\\}‘)
tex = replace_single_gls(tex p term_name_dict)
p = re.compile(‘\\\\firstacr\\{[^\\}]*\\}‘)
tex = replace_single_gls(tex p term_name_dict)
p = re.compile(‘\\\\glsacr\\{[^\\}]*\\}‘)
tex = replace_single_gls(tex p term_name_dict)
p = re.compile(‘\\\\glsentrytext\\{[^\\}]*\\}‘)
tex = replace_single_gls(tex p term_name_dict)
p = re.compile(‘\\\\glssymbol\\{[^\\}]*\\}‘)
tex = replace_single_gls(tex p term_symbol_dict)
return tex
if __name__ == ‘__main__‘:
input_tex = sys.argv[1]
term_name_dict term_symbol_dict = create_gls_dict()
print(replace_all_gls(input_tex term_name_dict term_symbol_dict))
#print(term_name_dict term_symbol_dict)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-02-12 01:25 deeplearningbook-chinese-master\
文件 256 2017-02-12 01:25 deeplearningbook-chinese-master\.gitignore
目录 0 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter1\
文件 17 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter1\README.md
文件 1549009 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter1\dlbook_cn_chapter1.pdf
文件 51618 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter1\introduction.tex
目录 0 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter10\
文件 17 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter10\README.md
文件 97102 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter10\sequence_modeling_rnn.tex
目录 0 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter11\
文件 20 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter11\README.md
文件 49127 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter11\practical_methodology.tex
目录 0 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter12\
文件 20 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter12\README.md
文件 101813 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter12\applications.tex
目录 0 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter13\
文件 20 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter13\README.md
文件 29362 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter13\linear_factor_models.tex
目录 0 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter14\
文件 20 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter14\README.md
文件 50918 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter14\autoencoders.tex
目录 0 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter15\
文件 20 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter15\README.md
文件 75445 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter15\representation_learning.tex
目录 0 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter16\
文件 20 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter16\README.md
文件 76640 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter16\structured_probabilistic_modelling.tex
目录 0 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter17\
文件 20 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter17\README.md
文件 36796 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter17\monte_carlo_methods.tex
目录 0 2017-02-12 01:25 deeplearningbook-chinese-master\Chapter18\
............此处省略150个文件信息
相关资源
- 基于机器视觉和深度学习的目标识别
- 深度学习在医学图像识别中的研究
- 基于深度学习的脑电信号研究
- 基于深度学习的车牌识别
- 无网格方法的经典教材的书籍的相关
- Neural Network and Deep Learning神经网络与深
- 神经网络与深度学习(Neural Networks
- 关于IPv6的介绍书籍
- 深度学习与计算机视觉.zip
- 基于深度学习的目标检测研究进展
- 国外近十年深度学习的研究现状与发
-
中文翻译 SphereFace Deep Hypersphere em
- DeepWalk.pptx
- 基于深度学习LSTM网络的短期电力负荷
- 深度学习在MR膝关节软骨图像中的分割
- 基于pytorch的cnn水果分类器深度学习平
- Tomcat经典书籍
- Neural Networks and Deep Learning神经网络与
- DBN源码,深度学习领域的适合初学者
- 关于深度学习的中英文文献资源5篇
- 神经网络与深度学习2018年4月4日0.5版
- 机器学习和深度学习模型汇总
- Deep+Learning深度学习学习笔记整理系列
- 基于卷积神经网络深度学习的物品分
- 基于深度学习的电动汽车智能充电需
- TensorFlow实战Google深度学习框架.pdf
- 高被引的深度学习综述的全文翻译+原
- crack detection
- 吴恩达课程所需lr_utils.py文件以及da
- 2018-深度强化学习综述
评论
共有 条评论