Datasets:
Upload README_zh.md with huggingface_hub
Browse files- README_zh.md +25 -19
README_zh.md
CHANGED
@@ -4,42 +4,48 @@ task_categories:
|
|
4 |
- image-to-text
|
5 |
---
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Dataset Description
|
|
|
8 |
|
9 |
-
|
10 |
|
11 |
-
|
12 |
-
在将*raw_formulas*数据集进行**清洗**并加入[im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA)数据集后得到了*cleaned_formulas*数据集(一个具有*550K*公式-图片对的数据集)。
|
13 |
|
14 |
-
|
15 |
* amsmath
|
16 |
* amsfonts
|
17 |
* amssymb
|
18 |
* mathtools
|
19 |
|
20 |
-
##
|
21 |
-
|
22 |
|
23 |
```python
|
24 |
from datasets import load_dataset
|
25 |
data = load_dataset("OleehyO/latex-formulas", "raw_formulas")
|
26 |
```
|
27 |
|
28 |
-
|
29 |
```python
|
30 |
from datasets import load_dataset
|
31 |
data = load_dataset("OleehyO/latex-formulas", "cleaned_formulas")
|
32 |
```
|
33 |
|
34 |
-
##
|
35 |
-
|
36 |
* equation
|
37 |
* align
|
38 |
* align*
|
39 |
* gather
|
40 |
* gather*
|
41 |
|
42 |
-
|
43 |
* \label
|
44 |
* %
|
45 |
* \quad
|
@@ -60,18 +66,18 @@ data = load_dataset("OleehyO/latex-formulas", "cleaned_formulas")
|
|
60 |
* \textheight
|
61 |
* \rule
|
62 |
|
63 |
-
## *cleaned_formulas
|
64 |
-
###
|
65 |
-
*
|
66 |
-
*
|
67 |
-
*
|
68 |
-
*
|
69 |
-
*
|
70 |
* \tag
|
71 |
* \text
|
72 |
* \begin{split}
|
73 |
* \end{split}
|
74 |
* \nonumber
|
75 |
* \notag
|
76 |
-
*
|
77 |
-
*
|
|
|
4 |
- image-to-text
|
5 |
---
|
6 |
|
7 |
+
# 𝑩𝑰𝑮 𝑵𝑬𝑾𝑺‼️
|
8 |
+
|
9 |
+
📮 [2𝟎2𝟒-𝟎2] We trained a formula recognition model, [𝐓𝐞𝐱𝐓𝐞𝐥𝐥𝐞𝐫](https://github.com/OleehyO/TexTeller?tab=readme-ov-file), using the latex-formulas dataset. It can convert LaTeX formulas into images and boasts **high accuracy** and **strong generalization capabilities**, covering **most formula recognition scenarios**.
|
10 |
+
|
11 |
+
> For more details, please refer to the [𝐓𝐞𝐱𝐓𝐞𝐥𝐥𝐞𝐫 GitHub repository](https://github.com/OleehyO/TexTeller?tab=readme-ov-file).
|
12 |
+
|
13 |
# Dataset Description
|
14 |
+
> [中文版本](./README_zh.md)
|
15 |
|
16 |
+
There are two datasets: **raw_formulas** and **cleaned_formulas**(This dataset has **550K formula-image pairs**).
|
17 |
|
18 |
+
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.
|
|
|
19 |
|
20 |
+
To render the images corresponding to the formulas, the following external packages are needed:
|
21 |
* amsmath
|
22 |
* amsfonts
|
23 |
* amssymb
|
24 |
* mathtools
|
25 |
|
26 |
+
## Usage
|
27 |
+
for **raw_formulas** dataset:
|
28 |
|
29 |
```python
|
30 |
from datasets import load_dataset
|
31 |
data = load_dataset("OleehyO/latex-formulas", "raw_formulas")
|
32 |
```
|
33 |
|
34 |
+
for **cleaned_formulas** dataset:
|
35 |
```python
|
36 |
from datasets import load_dataset
|
37 |
data = load_dataset("OleehyO/latex-formulas", "cleaned_formulas")
|
38 |
```
|
39 |
|
40 |
+
## Details About the *raw_formulas* Dataset
|
41 |
+
We scraped LaTeX formulas containing the following environments:
|
42 |
* equation
|
43 |
* align
|
44 |
* align*
|
45 |
* gather
|
46 |
* gather*
|
47 |
|
48 |
+
The formulas do not include the following content:
|
49 |
* \label
|
50 |
* %
|
51 |
* \quad
|
|
|
66 |
* \textheight
|
67 |
* \rule
|
68 |
|
69 |
+
## Preprocessing Details of the *cleaned_formulas* Dataset
|
70 |
+
### Cleaning
|
71 |
+
* We removed some useless junk data from both *raw_formulas* and [im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA).
|
72 |
+
* We deleted overly complex formulas from both *raw_formulas* and [im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA):
|
73 |
+
* Formulas were deleted if the aspect ratio of the corresponding rendered image was greater than 0.8.
|
74 |
+
* Formulas with a character length greater than 200 were deleted.
|
75 |
+
* In the formulas from both *raw_formulas* and [im2latex-100K](https://zenodo.org/records/56198#.V2px0jXT6eA), the following content was removed:
|
76 |
* \tag
|
77 |
* \text
|
78 |
* \begin{split}
|
79 |
* \end{split}
|
80 |
* \nonumber
|
81 |
* \notag
|
82 |
+
* The `equation`, `equation*`, `align`, `\[...\]` environments in *raw_formulas* were all replaced with the `align*` environment.
|
83 |
+
* We deleted formulas from *raw_formulas* that contained custom macros.
|