OleehyO commited on
Commit
c1f1046
1 Parent(s): 530aebf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -17
README.md CHANGED
@@ -5,28 +5,41 @@ task_categories:
5
  ---
6
 
7
  # Dataset Description
8
- > English version is [here](./README_English.md)
9
 
10
- 这里有两个数据集:*raw_formulas*和*cleaned_formulas*。
11
 
12
- 我们在*arxiv*上爬取了约100万条未经过清洗以及文本分词的latex公式的图片文本对从而得到了*raw_formulas*数据集。
13
- 在将*raw_formulas*数据集进行**清洗**并加入[im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA)数据集后得到了*cleaned_formulas*数据集(一个具有**550K**公式-图片对的数据集)。
14
 
15
- 渲染公式对应的图片时,需要用到以下外部包:
16
  * amsmath
17
  * amsfonts
18
  * amssymb
19
  * mathtools
20
 
21
- ## 有关*raw_formulas*数据集的一些细节
22
- 我们爬取了包含以下公式环境的latex公式:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  * equation
24
  * align
25
  * align*
26
  * gather
27
  * gather*
28
 
29
- 公式中不存在以下内容:
30
  * \label
31
  * %
32
  * \quad
@@ -47,18 +60,18 @@ task_categories:
47
  * \textheight
48
  * \rule
49
 
50
- ## *cleaned_formulas*数据集的一些预处理细节
51
- ### 清洗
52
- * 我们删除了*raw_formulas*和[im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA)中一些无用的垃圾数据
53
- * 我们删除了*raw_formulas*和[im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA)中过于复杂的公式:
54
- * 公式对应的渲染图片高宽比如果大于0.8,那么公式会被删除
55
- * 字符长度大于200的公式被删除了
56
- * 在*raw_formulas*和[im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA)的公式中,以下内容被删除了:
57
  * \tag
58
  * \text
59
  * \begin{split}
60
  * \end{split}
61
  * \nonumber
62
  * \notag
63
- * *raw_formulas*和中的`equationequation*、align、\[...\]`公式环境均被替换成了`align*`公式环境
64
- * 我们删除了*raw_formulas*中包含自定义宏的公式。
 
5
  ---
6
 
7
  # Dataset Description
8
+ > [中文版本](./README_zh.md)
9
 
10
+ There are two datasets: **raw_formulas** and **cleaned_formulas**(This dataset has *550K* formula-image pairs).
11
 
12
+ We scraped approximately 1 million LaTeX formula image-text pairs from *arxiv* that were uncleaned and without text segmentation to create the *raw_formulas* dataset. After cleaning the *raw_formulas* dataset and integrating it with the [im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA) dataset, we obtained the *cleaned_formulas* dataset, which has **550K** formula-image pairs.
 
13
 
14
+ To render the images corresponding to the formulas, the following external packages are needed:
15
  * amsmath
16
  * amsfonts
17
  * amssymb
18
  * mathtools
19
 
20
+ ## Usage
21
+ for **raw_formulas** dataset:
22
+
23
+ ```python
24
+ from datasets import load_dataset
25
+ data = load_dataset("OleehyO/latex-formulas", "raw_formulas")
26
+ ```
27
+
28
+ for **cleaned_formulas** dataset:
29
+ ```python
30
+ from datasets import load_dataset
31
+ data = load_dataset("OleehyO/latex-formulas", "cleaned_formulas")
32
+ ```
33
+
34
+ ## Details About the *raw_formulas* Dataset
35
+ We scraped LaTeX formulas containing the following environments:
36
  * equation
37
  * align
38
  * align*
39
  * gather
40
  * gather*
41
 
42
+ The formulas do not include the following content:
43
  * \label
44
  * %
45
  * \quad
 
60
  * \textheight
61
  * \rule
62
 
63
+ ## Preprocessing Details of the *cleaned_formulas* Dataset
64
+ ### Cleaning
65
+ * We removed some useless junk data from both *raw_formulas* and [im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA).
66
+ * We deleted overly complex formulas from both *raw_formulas* and [im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA):
67
+ * Formulas were deleted if the aspect ratio of the corresponding rendered image was greater than 0.8.
68
+ * Formulas with a character length greater than 200 were deleted.
69
+ * In the formulas from both *raw_formulas* and [im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA), the following content was removed:
70
  * \tag
71
  * \text
72
  * \begin{split}
73
  * \end{split}
74
  * \nonumber
75
  * \notag
76
+ * The `equation`, `equation*`, `align`, `\[...\]` environments in *raw_formulas* were all replaced with the `align*` environment.
77
+ * We deleted formulas from *raw_formulas* that contained custom macros.