{"id":19162768,"url":"https://github.com/centre-for-humanities-computing/word-associations","last_synced_at":"2026-07-15T20:34:11.912Z","repository":{"id":237474264,"uuid":"794496391","full_name":"centre-for-humanities-computing/word-associations","owner":"centre-for-humanities-computing","description":"Word associations in Indre Mission and Kirkeligt Samfund","archived":false,"fork":false,"pushed_at":"2025-03-19T11:19:49.000Z","size":353,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-27T03:51:30.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/centre-for-humanities-computing.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,"zenodo":null}},"created_at":"2024-05-01T10:02:03.000Z","updated_at":"2025-03-19T11:19:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"e7044247-c05f-4baa-ac3f-0c679011b852","html_url":"https://github.com/centre-for-humanities-computing/word-associations","commit_stats":null,"previous_names":["centre-for-humanities-computing/word-associations"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/centre-for-humanities-computing/word-associations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2Fword-associations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2Fword-associations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2Fword-associations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2Fword-associations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/centre-for-humanities-computing","download_url":"https://codeload.github.com/centre-for-humanities-computing/word-associations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centre-for-humanities-computing%2Fword-associations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35520683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-09T09:13:07.211Z","updated_at":"2026-07-15T20:34:11.886Z","avatar_url":"https://github.com/centre-for-humanities-computing.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# word-associations\nWord associations in Indre Mission and Kirkeligt Samfund.\n\n## Usage\n\nFolder structure:\n```\n- dataset/\n    - data/\n        - pr983_204.txt\n        ...\n    - Stopord.txt\n    - metadata_nordveck.csv\n```\n\nInstall requirements:\n```bash\npip install -r requirements.txt\n```\n\n### Preprocessing\n\nPreprocess the corpus (lemmatization, stop word removal, normalization):\n```python\npython3 src/clean_texts.py\n```\n\nThis will output the cleaned corpus as a csv file with `id`, `text` and `clean_text` columns.\n```\n- dataset/\n    - clean_data.csv\n```\n\n### Word count \nYou can use the `src/word_count.py run` CLI to extraxct the most common words.\n\n### Collect collocations\n\nYou can use the `src/cooccurrences.py run` CLI, to extract the highest scoring collocations of a target word based on PMI.\n\n#### Arguments\n\n| Argument                | Description                                                                                  | Type   | Default           |\n|-------------------------|----------------------------------------------------------------------------------------------|--------|-------------------|\n| `seed_word`             | Seed word to start off from.                                                                 | str    | -                 |\n| `-h`, `--help`          | Show help message and exit.                                                             |        |                   |\n| `--group_by GROUP_BY`,\u003cbr\u003e`-g GROUP_BY` | Metadata column to group results by.                                                        | str    | None              |\n| `--out_file OUT_FILE`,\u003cbr\u003e`-o OUT_FILE` | JSON file to output results to.                                                              | str    | results/coocurrences.json |\n| `--top_k TOP_K`,\u003cbr\u003e`-k TOP_K` | Top K ranking cooccurring words to output.                                                   | int    | 50                |\n| `--n_context N_CONTEXT`,\u003cbr\u003e`-n N_CONTEXT` | Number of context words to consider in each direction.                                     | int    | 5                 |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentre-for-humanities-computing%2Fword-associations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcentre-for-humanities-computing%2Fword-associations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentre-for-humanities-computing%2Fword-associations/lists"}