My Masters Thesis project on developing a search engine for Company's Sustainability Report in context of Corporate Sustainability Requirements
Jupyter Notebook
1
23 commits
updated Feb 26, 2024
Install pre-commit and run pre-commit run --all-files
There are two ways to download the files -
https://api.sustainabilityreportingnavigator.com/api/documents/{doc_id}/download : Provide the document id in the urlScript folder : srn_scrape
srn_scrape/srn_scraping.py : the main script to download the pdf documents but this will take time.
srn_scrape/srn_scrapping_async.py : a faster script to download pdf files using asyncio but there are some error handling required,
if you are running this script then run srn_scrape/re-download_broken_files.py to re-download the files for which the download failed
srn_scrape/test_pdfs.py : gives a count of good files and bad files (broken pdf files).
This script will convert the downloaded pdfs into json format using the viper parser.
Install viper paser from here
checkout branch - viper-optimizations
python viper_parser.py --config /cluster/home/repo/my_llm_experiments/esrs_data_scraping/viper_config.yaml --cuda-ids 0 1 2 3 4 5 6 --num_workers 8python main.py --config /cluster/home/repo/my_llm_experiments/esrs_data_scraping/main.yamlNotes :
collect_ in main.py downloads the data from the api and pushes the data to the sqlite db.convert_pdf_est_json function in main.py to find out the cost.json_to_docx function in main.py converts the parsed json file into docx documents with a unique identifieresrs_requirement_main.json is the output file generated with this scriptpython parse_esrs_requirements/main.py to create the parse_esrs_requirements/esrs_requirement_main.json filear16_table_gpt_generated.json is the parsed AR 16 table from the ESRS requirements.My Masters Thesis project on developing a search engine for Company's Sustainability Report in context of Corporate Sustainability Requirements
Jupyter Notebook
1
23 commits
updated Feb 26, 2024
Install pre-commit and run pre-commit run --all-files
There are two ways to download the files -
https://api.sustainabilityreportingnavigator.com/api/documents/{doc_id}/download : Provide the document id in the urlScript folder : srn_scrape
srn_scrape/srn_scraping.py : the main script to download the pdf documents but this will take time.
srn_scrape/srn_scrapping_async.py : a faster script to download pdf files using asyncio but there are some error handling required,
if you are running this script then run srn_scrape/re-download_broken_files.py to re-download the files for which the download failed
srn_scrape/test_pdfs.py : gives a count of good files and bad files (broken pdf files).
This script will convert the downloaded pdfs into json format using the viper parser.
Install viper paser from here
checkout branch - viper-optimizations
python viper_parser.py --config /cluster/home/repo/my_llm_experiments/esrs_data_scraping/viper_config.yaml --cuda-ids 0 1 2 3 4 5 6 --num_workers 8python main.py --config /cluster/home/repo/my_llm_experiments/esrs_data_scraping/main.yamlNotes :
collect_ in main.py downloads the data from the api and pushes the data to the sqlite db.convert_pdf_est_json function in main.py to find out the cost.json_to_docx function in main.py converts the parsed json file into docx documents with a unique identifieresrs_requirement_main.json is the output file generated with this scriptpython parse_esrs_requirements/main.py to create the parse_esrs_requirements/esrs_requirement_main.json filear16_table_gpt_generated.json is the parsed AR 16 table from the ESRS requirements.