{"id":21769950,"url":"https://github.com/mideind/rmh_utils","last_synced_at":"2025-03-21T06:14:32.381Z","repository":{"id":42470946,"uuid":"207633484","full_name":"mideind/RMH_Utils","owner":"mideind","description":"Utility scripts for RMH (The Icelandic Gigaword Corpus) and language models","archived":false,"fork":false,"pushed_at":"2022-11-28T18:54:14.000Z","size":57,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-26T03:08:13.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mideind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-10T18:26:40.000Z","updated_at":"2022-04-29T13:18:10.000Z","dependencies_parsed_at":"2023-01-21T15:47:42.935Z","dependency_job_id":null,"html_url":"https://github.com/mideind/RMH_Utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mideind%2FRMH_Utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mideind%2FRMH_Utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mideind%2FRMH_Utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mideind%2FRMH_Utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mideind","download_url":"https://codeload.github.com/mideind/RMH_Utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745751,"owners_count":20503050,"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":[],"created_at":"2024-11-26T14:10:42.985Z","updated_at":"2025-03-21T06:14:32.355Z","avatar_url":"https://github.com/mideind.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RMH Utils\nA collection of scripts to help with extracting data from Risamálheild (RMH) / Icelandic Gigaword Corpus (IGC).\n\nSupports version 21.05 of the IGC.\n\n## Extracting paragraphs\nTo extract \"raw text\" from the IGC, you can use the following command:\n```\n./extract_rmh.py -i /path_to/IGC-Adjud-21.05.zip --flatten-depth 0  # extract to a single txt file\n```\nThis will extract all paragraphs from the unannotated IGC.\nEach paragraph is split into sentences using [`tokenizer`](https://github.com/mideind/Tokenizer).\n- Sentences are separated with a newline.\n- Paragraphs are separated with an additional newline, i.e. there is an empty line between paragraphs.\n- Documents are separated with an additional newline, i.e. there are two empty lines between documents.\n\nSince the zip-files contains a lot of deeply-nested folders, it is recommended to use the `--flatten_depth` option to ignore these nested folders by combining files from nested folder which depth exceeds `--flatten_depth` into a single output file.\nThis option controls how deep the nested structure is preserved in the output and is best adjusted per zip-file.\n\nSuggested values for `--flatten_depth` are:\n```\n./extract_rmh.py -i /path/to/rmh-2021/IGC-Adjud-21.05.zip --flatten_depth 0     # each top level folder is combined into a single file, results in a single file: IGC-Adjud-21.05.txt\n./extract_rmh.py -i /path/to/rmh-2021/IGC-Books-21.10.zip --flatten_depth 0     # each top level folder is combined into a single file, results in a single file: IGC-Books-21.10.txt\n./extract_rmh.py -i /path/to/rmh-2021/IGC-Journals-21.12.zip --flatten_depth 0  # each top level folder is combined into a single file, results in a single file: IGC-Journals-21.12.txt\n./extract_rmh.py -i /path/to/rmh-2021/IGC-Laws-21.05.zip --flatten_depth 0      # each top level folder is combined into a single file, results in a single file: IGC-Laws-21.05.txt\n./extract_rmh.py -i /path/to/rmh-2021/IGC-News1-21.05.zip --flatten_depth 1     # top level folders are kept, results in a single under file: CC_BY/IGC-News1-21.05.txt\n./extract_rmh.py -i /path/to/rmh-2021/IGC-News2-21.05.zip --flatten_depth 2     # two top levels of folders are kept, results in multiple files under MIM/IGC-News2-21.05.TEI/\n./extract_rmh.py -i /path/to/rmh-2021/IGC-Parla-21.12.zip --flatten_depth 0     # each top level folder is combined into a single file, results in a single file: IGC-Parla-21.12.txt\n./extract_rmh.py -i /path/to/rmh-2021/IGC-Social-21.10.zip  --flatten_depth 2   # two top levels of folders are kept, results in multiple files under TEI/IGC-Social-21.10.TEI/\n```\n\nFor other options see `./extract_rmh.py --help`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmideind%2Frmh_utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmideind%2Frmh_utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmideind%2Frmh_utils/lists"}