{"id":20486243,"url":"https://github.com/undp-data/dsc-sdgi-corpus","last_synced_at":"2026-04-17T03:32:53.677Z","repository":{"id":234784401,"uuid":"789490652","full_name":"UNDP-Data/dsc-sdgi-corpus","owner":"UNDP-Data","description":"Model benchmarks on SDGi Corpus, a multilingual dataset for text classification by Sustainable Development Goals.","archived":false,"fork":false,"pushed_at":"2024-04-25T13:10:55.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T04:43:35.045Z","etag":null,"topics":["dataset","sustainable-development-goals","text-classification"],"latest_commit_sha":null,"homepage":"https://huggingface.co/datasets/UNDP/sdgi-corpus","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UNDP-Data.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-20T17:41:59.000Z","updated_at":"2024-11-29T19:57:36.000Z","dependencies_parsed_at":"2024-04-20T19:44:08.401Z","dependency_job_id":"0e4a99a6-f183-4b24-9a80-6c54aa8b48a5","html_url":"https://github.com/UNDP-Data/dsc-sdgi-corpus","commit_stats":null,"previous_names":["undp-data/dsc-sdgi-corpus"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNDP-Data%2Fdsc-sdgi-corpus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNDP-Data%2Fdsc-sdgi-corpus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNDP-Data%2Fdsc-sdgi-corpus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNDP-Data%2Fdsc-sdgi-corpus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UNDP-Data","download_url":"https://codeload.github.com/UNDP-Data/dsc-sdgi-corpus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242061220,"owners_count":20065688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dataset","sustainable-development-goals","text-classification"],"created_at":"2024-11-15T16:35:50.613Z","updated_at":"2026-04-17T03:32:48.639Z","avatar_url":"https://github.com/UNDP-Data.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dsc-sdgi-corpus\n\n\n[![python](https://img.shields.io/badge/Python-3.11-blue.svg?logo=python\u0026logoColor=white)](https://www.python.org)\n![Licence](https://img.shields.io/github/license/UNDP-Data/dsc-sdgi-corpus\n)\n\u003ca href=\"https://huggingface.co/datasets/UNDP/sdgi-corpus\"\u003e\n    \u003cimg alt=\"Website\" src=\"https://img.shields.io/website?url=https%3A%2F%2Fhuggingface.co%2Fdatasets%2FUNDP%2Fsdgi-corpus\u0026label=Dataset\u0026up_message=UNDP/sdgi-corpus\u0026up_color=blue\"\u003e\n\u003c/a\u003e\n\n## Introduction\n\nModel benchmarks on [SDGi Corpus](https://huggingface.co/datasets/UNDP/sdgi-corpus), a multilingual dataset for text \nclassification by Sustainable Development Goals.\n\n## Getting Started\n\n### Python Environment\n\nThe codebase has been developed and tested in Python `3.11`. To create a local python environment, clone the repository\nand run the following commands in the project directory:\n\n```shell\npython -m venv .venv/\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n### Environment Variables\n\nThe following environment variables may need to be set in `.env` file:\n\n```shell\n# Location for an MLflow database\nMLFLOW_TRACKING_URI=\"sqlite:///mlruns.db\"\n\n# The below is only required for GPT experiments or OOD data\nAZURE_OPENAI_API_KEY=\"\u003cAzure OpenAI API Key\u003e\"\nAZURE_OPENAI_ENDPOINT=\"\u003cAzure OpenAI API Endpoint\u003e\"\nAZURE_OPENAI_EMBEDDING_MODEL=\"\u003cAzure OpenAI Embedding Model Deployment\u003e\"\n```\n\n## Running Experiments\n\nFor running out-of-domain (OOD) experiments, one needs to first prepare it using a function from `src`. This requires\naccess Azure OpenAI and setting the env variables mentioned above. To create and save a dataset run:\n\n```python\nfrom src import prepare_ood_dataset\n\ndataset = prepare_ood_dataset()\ndataset.save_to_disk(\"data/sdg-meter\")\n```\n\nTo replicate supervised results from the paper, you can run the Shell script:\n\n```shell\nchmod 755 main.sh\n./main.sh\n```\n\nIf you prefer running individual experiments, you can use `main.py`:\n```shell\npython main.py --size s --language xx\n```\n\nResults are saved to a local SQLite database you specify in the enviroment variables. To view the results in MLflow, run:\n\n```shell\nmlflow ui --port 8080 --backend-store-uri sqlite:///mlruns.db\n# open http://127.0.0.1:8080\n```\n\n## Contribute\nIf you have any questions or notice any issues, feel free to [open an issue](https://github.com/UNDP-Data/dsc-sdgi-corpus/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fundp-data%2Fdsc-sdgi-corpus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fundp-data%2Fdsc-sdgi-corpus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fundp-data%2Fdsc-sdgi-corpus/lists"}