Datasets:
三洋三洋
commited on
Commit
•
473a9c8
1
Parent(s):
9165bfb
2023-07-26
Browse files- README.md +93 -2
- README_English.md +96 -0
README.md
CHANGED
@@ -5,5 +5,96 @@ task_categories:
|
|
5 |
---
|
6 |
|
7 |
# Dataset Description
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
---
|
6 |
|
7 |
# Dataset Description
|
8 |
+
> English version is [here](./README_English.md)
|
9 |
+
|
10 |
+
这里有两个数据集:*raw_formulas*和*tokenized_formulas*。
|
11 |
+
|
12 |
+
我们在*arxiv*上爬取了约100万条未经过清洗以及文本分词的latex公式的图片文本对从而得到了*raw_formulas*数据集。在将*raw_formulas*数据集进行**清洗**以及**文本分词**后得到了*tokenized_formulas*数据集。
|
13 |
+
|
14 |
+
渲染公式对应的图片时,需要用到以下外部包:
|
15 |
+
* amsmath
|
16 |
+
* amsfonts
|
17 |
+
* amssymb
|
18 |
+
* mathtools
|
19 |
+
|
20 |
+
## 有关*raw_formulas*数据集的一些细节
|
21 |
+
我们爬取了包含以下公式环境的latex公式:
|
22 |
+
* equation
|
23 |
+
* align
|
24 |
+
* align*
|
25 |
+
* gather
|
26 |
+
* gather*
|
27 |
+
公式中不存在以下内容:
|
28 |
+
* \label
|
29 |
+
* %
|
30 |
+
* \quad
|
31 |
+
* \qquad
|
32 |
+
* \vspace
|
33 |
+
* \hspace
|
34 |
+
* \resizebox
|
35 |
+
* \scalebox
|
36 |
+
* \rotatebox
|
37 |
+
* \parbox
|
38 |
+
* \fbox
|
39 |
+
* \makebox
|
40 |
+
* \raisebox
|
41 |
+
* \addvspace
|
42 |
+
* \hfill
|
43 |
+
* \vfill
|
44 |
+
* \textwidth
|
45 |
+
* \textheight
|
46 |
+
* \rule
|
47 |
+
|
48 |
+
## *tokenized_formulas*数据集的一些预处理细节
|
49 |
+
### 清洗
|
50 |
+
* 我们删除了*raw_formulas*中一些无用的垃圾数据
|
51 |
+
* 我们删除了*raw_formulas*中过于复杂的公式:
|
52 |
+
* 公式对应的渲染图片高宽比如果大于0.8,那么公式会被删除
|
53 |
+
* 字符长度大于200的公式被删除了
|
54 |
+
* *raw_formulas*公式中的以下内容被删除了:
|
55 |
+
* \tag
|
56 |
+
* \text
|
57 |
+
* \begin{split}
|
58 |
+
* \end{split}
|
59 |
+
* \nonumber
|
60 |
+
* \notag
|
61 |
+
* *raw_formulas*中的`equation、equation*、align、\[...\]`公式环境被替换成了`align*`公式环境,`gather`公式环境被替换成了`gather*`环境
|
62 |
+
* 我们删除了*raw_formulas*中包含自定义宏的公式,**只有以下的常见自定义宏被保留了**:
|
63 |
+
* \newcommand{\R}{\mathbb{R}}
|
64 |
+
* \newcommand{\N}{\mathbb{N}}
|
65 |
+
* \newcommand{\Z}{\mathbb{Z}}
|
66 |
+
* \newcommand{\Q}{\mathbb{Q}}
|
67 |
+
* \newcommand{\C}{\mathbb{C}}
|
68 |
+
* \newcommand{\avg}[1]{\left<#1\right>}
|
69 |
+
* \newcommand{\Deriv}[2]{\frac{\mathrm{d} #1}{\mathrm{d} #2}}
|
70 |
+
* \newcommand{\dd}{\mathrm{d}}
|
71 |
+
* \newcommand{\norm}[1]{\left\lVert#1\right\rVert}
|
72 |
+
* \newcommand{\abs}[1]{\left|#1\right|}
|
73 |
+
* \newcommand{\vect}[1]{\mathbf{#1}}
|
74 |
+
### 分词
|
75 |
+
符合以下patten的子串被视为一个词:
|
76 |
+
* \begin{.*?}
|
77 |
+
* \end\{.*?}
|
78 |
+
* \[A-Za-z]+
|
79 |
+
|
80 |
+
以下关键词也被视为一个词:
|
81 |
+
* \[
|
82 |
+
* \]
|
83 |
+
* \\
|
84 |
+
* \{
|
85 |
+
* \}
|
86 |
+
* \_
|
87 |
+
* \$
|
88 |
+
* \&
|
89 |
+
* \#
|
90 |
+
* \%
|
91 |
+
* \|
|
92 |
+
* '
|
93 |
+
* ''
|
94 |
+
* '''
|
95 |
+
* ''''
|
96 |
+
* '\^
|
97 |
+
* ''\^
|
98 |
+
* '''\^
|
99 |
+
* ''''\^
|
100 |
+
|
README_English.md
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: openrail
|
3 |
+
task_categories:
|
4 |
+
- image-to-text
|
5 |
+
---
|
6 |
+
# Dataset Description
|
7 |
+
There are two datasets here: *raw_formulas* and *tokenized_formulas*.
|
8 |
+
|
9 |
+
We crawled approximately 1 million uncleaned and untokenized latex formula image-text pairs from *arxiv*, resulting in the *raw_formulas* dataset. After cleaning and tokenizing the *raw_formulas* dataset, we obtained the *tokenized_formulas* dataset.
|
10 |
+
|
11 |
+
When rendering images corresponding to the formulas, the following external packages are required:
|
12 |
+
|
13 |
+
* amsmath
|
14 |
+
* amsfonts
|
15 |
+
* amssymb
|
16 |
+
* mathtools
|
17 |
+
|
18 |
+
## Details about the *raw_formulas* dataset
|
19 |
+
We crawled latex formulas containing the following formula environments:
|
20 |
+
* equation
|
21 |
+
* align
|
22 |
+
* align*
|
23 |
+
* gather
|
24 |
+
* gather*
|
25 |
+
The formulas do not contain the following content:
|
26 |
+
* \label
|
27 |
+
* %
|
28 |
+
* \quad
|
29 |
+
* \qquad
|
30 |
+
* \vspace
|
31 |
+
* \hspace
|
32 |
+
* \resizebox
|
33 |
+
* \scalebox
|
34 |
+
* \rotatebox
|
35 |
+
* \parbox
|
36 |
+
* \fbox
|
37 |
+
* \makebox
|
38 |
+
* \raisebox
|
39 |
+
* \addvspace
|
40 |
+
* \hfill
|
41 |
+
* \vfill
|
42 |
+
* \textwidth
|
43 |
+
* \textheight
|
44 |
+
* \rule
|
45 |
+
|
46 |
+
## Preprocessing details of the *tokenized_formulas* dataset
|
47 |
+
### Cleaning
|
48 |
+
* We removed some useless junk data from *raw_formulas*.
|
49 |
+
* We removed overly complex formulas from *raw_formulas*:
|
50 |
+
* Formulas with a render image aspect ratio greater than 0.8 were deleted.
|
51 |
+
* Formulas with a character length greater than 200 were deleted.
|
52 |
+
* The following content in *raw_formulas* formulas was removed:
|
53 |
+
* \tag,
|
54 |
+
* \text
|
55 |
+
* \begin{split}
|
56 |
+
* \end{split}
|
57 |
+
* \nonumber
|
58 |
+
* \notag
|
59 |
+
* In *raw_formulas*, the `equation, equation*, align, \[...\]` formula environments were replaced with the `align*` formula environment, and the `gather` formula environment was replaced with the `gather*` environment.
|
60 |
+
* We removed formulas containing custom macros from *raw_formulas*, only the following common custom macros were retained:
|
61 |
+
* \newcommand{\R}{\mathbb{R}}
|
62 |
+
* \newcommand{\N}{\mathbb{N}}
|
63 |
+
* \newcommand{\Z}{\mathbb{Z}}
|
64 |
+
* \newcommand{\Q}{\mathbb{Q}}
|
65 |
+
* \newcommand{\C}{\mathbb{C}}
|
66 |
+
* \newcommand{\avg}[1]{\left<#1\right>}
|
67 |
+
* \newcommand{\Deriv}[2]{\frac{\mathrm{d} #1}{\mathrm{d} #2}}
|
68 |
+
* \newcommand{\dd}{\mathrm{d}}
|
69 |
+
* \newcommand{\norm}[1]{\left\lVert#1\right\rVert}
|
70 |
+
* \newcommand{\abs}[1]{\left|#1\right|}
|
71 |
+
* \newcommand{\vect}[1]{\mathbf{#1}}
|
72 |
+
|
73 |
+
### Tokenization
|
74 |
+
Substrings that match the following pattern are considered a word:
|
75 |
+
* \begin{.*?}
|
76 |
+
* \end{.*?}
|
77 |
+
* [A-Za-z]+
|
78 |
+
|
79 |
+
The following keywords are also considered a word:
|
80 |
+
* ]
|
81 |
+
* {
|
82 |
+
* }
|
83 |
+
* _
|
84 |
+
* $
|
85 |
+
* &
|
86 |
+
* #
|
87 |
+
* %
|
88 |
+
* |
|
89 |
+
* '
|
90 |
+
* ''
|
91 |
+
* '''
|
92 |
+
* ''''
|
93 |
+
* '^
|
94 |
+
* ''^
|
95 |
+
* '''^
|
96 |
+
* ''''^
|