Skip to content

abcAnonymous/EDSL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EDSL

EDSL code

Prerequsites

  1. Pytorch
  2. Numpy, Pillow
  3. Pdflatex
  4. ImageMagick

Dataset Download

ME-98K dataset: https://pan.baidu.com/s/1itQEjPUMve3A3dXezJDedw password: axqh

ME-20K dataset: https://pan.baidu.com/s/1ti1xfCdj6c36yvy_sHld5Q password: nwks

Quick Start

1. prepocess

Preprocessing of training set.
python scrips/preprocessing/preprocess_train.py --formulas data/sample/formulas.txt --train data/sample/train.txt --vocab data/sample/latex_vocab.txt --img data/sample/image_processed/

Preprocessing of validation set
python scrips/preprocessing/preprocess_val.py --formulas data/sample/formulas.txt --val data/sample/train.txt --vocab data/sample/latex_vocab.txt --img data/sample/image_processed/

Preprocessing of test set
python scrips/preprocessing/preprocess_test.py --formulas data/sample/formulas.txt --test data/sample/test.txt --vocab data/sample/latex_vocab.txt --img data/sample/image_processed/

2. training model

python src/train.py --formulas data/sample/formulas.txt --train data/sample/train.txt --val data/sample/val.txt --vocab data/sample/latex_vocab.txt

3. testing

python src/train.py --formulas data/sample/formulas.txt --test data/sample/test.txt --vocab data/sample/latex_vocab.txt

4. evaluation

BLEU-4 Calculation:
python scrips/evaluation/Cal_B4.py --formulas data/sample/formulas.txt

Rouge-4 Calculation:
python scrips/evaluation/Cal_R4.py --formulas data/sample/formulas.txt

Match Calculation:
python scrips/evaluation/CalculateMath.py --formulas data/sample/formulas.txt

Match-ws Calculation:
python scrips/evaluation/CalculateMath-WS.py --formulas data/sample/formulas.txt

About

EDSL code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages