Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -5,28 +5,41 @@ task_categories:
|
|
5 |
---
|
6 |
|
7 |
# Dataset Description
|
8 |
-
>
|
9 |
|
10 |
-
|
11 |
|
12 |
-
|
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 |
-
##
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
*
|
53 |
-
*
|
54 |
-
*
|
55 |
-
*
|
56 |
-
*
|
57 |
* \tag
|
58 |
* \text
|
59 |
* \begin{split}
|
60 |
* \end{split}
|
61 |
* \nonumber
|
62 |
* \notag
|
63 |
-
*
|
64 |
-
*
|
|
|
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.
|