puhuilab's picture
Upload folder using huggingface_hub
b470a4f verified
metadata
license: apache-2.0

PH FORMULA CORPUS V1

PH_FORMULA_CORPUS_V1 is a large-scale formula corpus containing 160 million normalized mathematical expressions.

Each formula has been carefully normalized to ensure concise, consistent, and simplified representations.

πŸ—“οΈ Timeline

  • βœ… July 2025 – Released the formula corpus
  • πŸ”œ Aug 2025 – Upcoming release of the synthetic datasets
  • ⏳ Sep 2025 – Scheduled release of a model achieving commercial-grade qualit PHOCR

πŸ”§ Normalization Process

  1. Parse formulas using the KaTeX syntax tree with customized macro definitions.
  2. Traverse the tree with a tailored algorithm to normalize the expression of each node.

Additional normalization steps include:

  • Standardizing \operatorname and \operatorname* usage
  • Unifying variations of \textxx and \mathxx commands
  • Normalizing spacing across all elements

πŸ“˜ Dataset Usage

def test_parquet():
    import random
    import pyarrow.parquet as pq
    s
    input_file = "/path/to/formula_corpus_v1.parquet"
    table = pq.read_table(input_file)
    print(f"Total rows: {len(table)}")

    num_rows = min(100, len(table))
    indices = random.sample(range(len(table)), num_rows)
    formulas = table.column("formula")
    for idx in indices:
        print(formulas[idx].as_py())

πŸ“š Citation

Thank you for using PH_FORMULA_CORPUS_V1.
This dataset is developed and maintained by Puhuilab.

If you use this dataset in your research or applications, please remember to give appropriate credit.

To cite PH_FORMULA_CORPUS_V1 in academic work, please use the following BibTeX entry:

@misc{phformulacorpusv12025,
  title={PHFormulaCorpusV1: A Large-Scale Normalized LaTeX Formula Dataset},
  author={Puhui Lab},
  year={2025},
  url={https://huggingface.co/datasets/puhuilab/ph_formula_corpus_v1}
}

πŸ’‘ Acknowledgment

The dataset follows the licenses of its original sources: