{"id":16650917,"url":"https://github.com/swabhs/scaffolding","last_synced_at":"2025-07-28T12:33:43.604Z","repository":{"id":149016769,"uuid":"146392876","full_name":"swabhs/scaffolding","owner":"swabhs","description":"Frame-Semantic and PropBank Semantic Role Labeling with Syntactic Scaffolding.","archived":false,"fork":false,"pushed_at":"2021-06-27T23:12:01.000Z","size":2133,"stargazers_count":50,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-16T12:15:43.193Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swabhs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2018-08-28T04:42:33.000Z","updated_at":"2024-01-04T16:25:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"d9aaa798-b43a-49ff-b919-3c706c4e03d8","html_url":"https://github.com/swabhs/scaffolding","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/swabhs%2Fscaffolding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swabhs%2Fscaffolding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swabhs%2Fscaffolding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swabhs%2Fscaffolding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swabhs","download_url":"https://codeload.github.com/swabhs/scaffolding/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231804144,"owners_count":18429028,"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-10-12T09:23:02.593Z","updated_at":"2024-12-30T17:37:08.131Z","avatar_url":"https://github.com/swabhs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scaffolding: Syntactic Scaffolds for Semantic Structures\n\nA repository based on the EMNLP 2018 [paper](https://arxiv.org/abs/1808.10485) for Frame-Semantic and PropBank Semantic Role Labeling with Syntactic Scaffolding. \n\n\n## Installation\nThis repository was built on an earlier version of [AllenNLP](https://github.com/allenai/allennlp).\nDue to changes in the API, we recommended installing directly via steps below (adapted from the AllenNLP installation), as opposed to using an installed version of AllenNLP.\n\n1.  [Download and install Conda](https://conda.io/docs/download.html).\n\n2.  Create a Conda environment with Python 3.6\n\n    ```\n    conda create -n scaffold python=3.6\n    ```\n\n3.  Activate the Conda environment.  (You will need to activate the Conda environment in each terminal in which you want to use AllenNLP.\n\n    ```\n    source activate scaffold\n    ```\n\n4. Install in your environment\n\n    ```\n    git clone https://github.com/swabhs/scaffolding.git\n    ```\n\n5. Change your directory to where you cloned the files:\n\n    ```\n    cd scaffolding/\n    ```\n\n6.  Install the required dependencies.\n\n    ```\n    INSTALL_TEST_REQUIREMENTS=\"true\" ./scripts/install_requirements.sh\n    ```\n\n7. Install PyTorch version 0.3 **via pip** ([modify](https://pytorch.org/previous-versions/) based on your CUDA environment).\nConda-based installation results in [slower rutime](https://github.com/pytorch/pytorch/issues/537) because of a CUDA issue.\n\n    ```\n    pip install http://download.pytorch.org/whl/cu80/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl\n    ```\n\n## Step 1: Get Data\n\nDownload [FN data](https://drive.google.com/file/d/15n3M4AmURGdGqnNAjn352buUTV5S-fVI/view?usp=sharing) and place it under a `data/` directory under the root directory.\n\nThe [OntoNotes datasets](https://catalog.ldc.upenn.edu/LDC2013T19) can be obtained through LDC.\n\n## Step 2: Get Pre-trained Models\n\n[Frame-SRL baseline](https://drive.google.com/open?id=1f7ZLOBc65Y74hPQlYY8mGVHkCiN14dwH)\n\n[Frame-SRL scaffold with common non-terminals](https://drive.google.com/open?id=1V1-U70U-wDKaG3zuONQN3eB77jjS3FSd)\n\n[PropBank SRL baseline](https://drive.google.com/file/d/1ThTagaJeZkIACEYfDn6f4mjMHs0PMSAo/view?usp=sharing)\n\n[PropBank SRL scaffold with common non-terminals](https://drive.google.com/file/d/1vv3KC_OLx0A7ItKqBz9yWwZLIsVZhR5B/view?usp=sharing)\n\n\n## Step 3: Test\n\n```\npython -m allennlp.run evaluate \\\n    --archive-file log_final_pb_baseline/model.tar.gz \\\n    --evaluation-data-file data/fndata-1.5/test/fulltext/ \\\n    --cuda-device 0\n```\n\nFor the syntactic scaffold model for PropBank SRL, use the `pbscaf` branch:\n```\ngit checkout pbscaf\n```\nand then run evaluation as above.\n\n## Training\n\nFor scaffolds, use `$command=train_m` and for baselines, `$command=train`.\n```\npython -m allennlp.run $command training_config/$config --serialization-dir log\n```\n\n## Acknowledgment\n\nThis is based on our [paper](https://arxiv.org/abs/1808.10485), please cite:\n\n```\n@inproceedings{swayamdipta:2018,\n    author      = {Swabha Swayamdipta and Sam Thomson and Kenton Lee and Luke Zettlemoyer and Chris Dyer and Noah A. Smith},\n    title       = {Syntactic Scaffolding for Semantic Structures},\n    booktitle   = {Proc. of EMNLP},\n    url         = {https://arxiv.org/abs/1808.10485},\n    year        = {2018}\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswabhs%2Fscaffolding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswabhs%2Fscaffolding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswabhs%2Fscaffolding/lists"}