{"id":19025103,"url":"https://github.com/divefish/compatibilitymodeling","last_synced_at":"2025-10-10T08:06:41.517Z","repository":{"id":133812714,"uuid":"445217080","full_name":"DiveFish/CompatibilityModeling","owner":"DiveFish","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-06T15:37:06.000Z","size":2297,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T08:06:38.946Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DiveFish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-01-06T15:25:51.000Z","updated_at":"2022-01-06T15:37:09.000Z","dependencies_parsed_at":"2023-03-14T20:00:34.058Z","dependency_job_id":null,"html_url":"https://github.com/DiveFish/CompatibilityModeling","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DiveFish/CompatibilityModeling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiveFish%2FCompatibilityModeling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiveFish%2FCompatibilityModeling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiveFish%2FCompatibilityModeling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiveFish%2FCompatibilityModeling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DiveFish","download_url":"https://codeload.github.com/DiveFish/CompatibilityModeling/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiveFish%2FCompatibilityModeling/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003294,"owners_count":26083555,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"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-08T20:41:49.886Z","updated_at":"2025-10-10T08:06:41.323Z","avatar_url":"https://github.com/DiveFish.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CompatibilityModeling\nThis is a fork of sfb833-a3/CompatibilityModeling that includes the parts that can be made publicly available. Code written by [janniss91](https://github.com/janniss91).\n\n## Setup\n\nFor the setup of this repository simply type:\n\n    make\n\nThis will\n\n- set up a virtual environment for this repository,\n- install all necessary project dependencies.\n\nThe lowest python version you can use is 3.7 (because the repository includes data classes).  \nIt is recommended to use ```Python 3.8```.\n\n## Clean and Re-install\n\nTo reset the repository to its inital state, type:\n\n    make dist-clean\n\nThis will remove the virtual environment and all dependencies.  \nWith the `make` command you can re-install them.\n\nTo remove temporary files like .pyc or .pyo files, type:\n\n    make clean\n\n## Packaging Info\n\nThe directory ```src/``` is a package, which is installed when you run the ```make``` command.  \nBe careful to run it with the **Python module syntax** that you can see in the section ```Running``` below.\n\n## Running\n\nTo extract all ambiguous PPs with their possible heads, type:\n\n    python3 -m src.extract_ambiguous_pp your_input.conll your_output.tsv\n\n**Todo**: The explanation for extract_pps must go here.\n\n## Testing\n\nTo run the tests, type:\n\n    python -m pytest tests/test_extract_ambiguous_pp.py\n\n## Stored Models\n\n3 of the different trained models have been stored:\n\n1. Logistic Regression\n2. NeuralCandidateScoringModel\n3. NeuralCandidateScoringModel with Averaged nouns and lemma inputs\n\nThe models are stored in the `trained-models` directory.\n\nThe typical pytorch `state_dict` saving has been used.  \nTo load the model for inference, use:\n\n```python\nfrom src.pp_head_selection.models import NeuralCandidateScoringModel\nmodel = NeuralCandidateScoringModel(input_dim=1076, output_dim=2)\nmodel.load_state_dict(torch.load(\"trained-models/NeuralCandidateScoringModel\"))\n\n# OR:\nfrom src.pp_head_selection.models import NeuralCandidateScoringModel\nmodel = NeuralCandidateScoringModel(input_dim=1076, output_dim=2)\nmodel.load_state_dict(torch.load(\"trained-models/NeuralCandidateScoringModel-averaged-nouns\"))\n\n# OR: \nfrom src.pp_head_selection.models import LogisticRegression\nmodel = LogisticRegression(input_dim=1076, output_dim=2)\nmodel.load_state_dict(torch.load(\"trained-models/LogisticRegression\"))\n\n\n# To inspect the model, use:\nmodel.eval()\n```\n\nYou must provide the `input_dim` and `output_dim` to the models.\nThe input and output dimensions are `1076` and `2` for all models.\nHowever, note that for other feature selection processes, the input dimension might change.\n\nYou can find the training metrics and metadata for the threem models in `train-results/logs.txt`.  \nFor the stored models a category `Stored Model Path` is among the logged information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivefish%2Fcompatibilitymodeling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivefish%2Fcompatibilitymodeling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivefish%2Fcompatibilitymodeling/lists"}