--- license: openrail task_categories: - image-to-text --- # Dataset Description > English version is [here](./README_English.md) 这里有两个数据集:*raw_formulas*和*tokenized_formulas*。 我们在*arxiv*上爬取了约100万条未经过清洗以及文本分词的latex公式的图片文本对从而得到了*raw_formulas*数据集。在将*raw_formulas*数据集进行**清洗**以及**文本分词**后得到了*tokenized_formulas*数据集。 渲染公式对应的图片时,需要用到以下外部包: * amsmath * amsfonts * amssymb * mathtools ## 有关*raw_formulas*数据集的一些细节 我们爬取了包含以下公式环境的latex公式: * equation * align * align* * gather * gather* 公式中不存在以下内容: * \label * % * \quad * \qquad * \vspace * \hspace * \resizebox * \scalebox * \rotatebox * \parbox * \fbox * \makebox * \raisebox * \addvspace * \hfill * \vfill * \textwidth * \textheight * \rule ## *tokenized_formulas*数据集的一些预处理细节 ### 清洗 * 我们删除了*raw_formulas*中一些无用的垃圾数据 * 我们删除了*raw_formulas*中过于复杂的公式: * 公式对应的渲染图片高宽比如果大于0.8,那么公式会被删除 * 字符长度大于200的公式被删除了 * *raw_formulas*公式中的以下内容被删除了: * \tag * \text * \begin{split} * \end{split} * \nonumber * \notag * *raw_formulas*中的`equation、equation*、align、\[...\]`公式环境被替换成了`align*`公式环境,`gather`公式环境被替换成了`gather*`环境 * 我们删除了*raw_formulas*中包含自定义宏的公式,**只有以下的常见自定义宏被保留了**: * \newcommand{\R}{\mathbb{R}} * \newcommand{\N}{\mathbb{N}} * \newcommand{\Z}{\mathbb{Z}} * \newcommand{\Q}{\mathbb{Q}} * \newcommand{\C}{\mathbb{C}} * \newcommand{\avg}[1]{\left<#1\right>} * \newcommand{\Deriv}[2]{\frac{\mathrm{d} #1}{\mathrm{d} #2}} * \newcommand{\dd}{\mathrm{d}} * \newcommand{\norm}[1]{\left\lVert#1\right\rVert} * \newcommand{\abs}[1]{\left|#1\right|} * \newcommand{\vect}[1]{\mathbf{#1}} ### 分词 符合以下pattern的子串被视为一个词: * \begin{.*?} * \end\{.*?} * \\[A-Za-z]+ 以下字符串也被视为一个词: * \\[ * \\] * \\\ * \\{ * \\} * \\_ * \\$ * \\& * \\# * \\% * \\| * ' * '' * ''' * '''' * '\^ * ''\^ * '''\^ * ''''\^