{"id":13753290,"url":"https://github.com/magic282/NeuSum","last_synced_at":"2025-05-09T20:35:17.526Z","repository":{"id":74397985,"uuid":"132835750","full_name":"magic282/NeuSum","owner":"magic282","description":"Code for the ACL 2018 paper \"Neural Document Summarization by Jointly Learning to Score and Select Sentences\"","archived":true,"fork":false,"pushed_at":"2018-10-05T03:24:57.000Z","size":33,"stargazers_count":151,"open_issues_count":0,"forks_count":34,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-16T05:32:43.710Z","etag":null,"topics":["natural-language-processing","summarization"],"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/magic282.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}},"created_at":"2018-05-10T02:08:35.000Z","updated_at":"2024-09-05T08:27:46.000Z","dependencies_parsed_at":"2023-06-10T23:00:37.751Z","dependency_job_id":null,"html_url":"https://github.com/magic282/NeuSum","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/magic282%2FNeuSum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic282%2FNeuSum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic282%2FNeuSum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic282%2FNeuSum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magic282","download_url":"https://codeload.github.com/magic282/NeuSum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253321860,"owners_count":21890481,"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":["natural-language-processing","summarization"],"created_at":"2024-08-03T09:01:19.673Z","updated_at":"2025-05-09T20:35:12.476Z","avatar_url":"https://github.com/magic282.png","language":"Python","funding_links":[],"categories":["文本摘要"],"sub_categories":[],"readme":"# NeuSum\nThis repository contains code for the ACL 2018 paper \"Neural Document Summarization by Jointly Learning to Score and Select Sentences\"\n\n## About this code\n**PyTorch version**: This code requires PyTorch v0.3.x.\n\n**Python version**: This code requires Python3.\n\n\n## How to run\n\n### Prepare the dataset and code\nMake a folder for the code and data:\n```bash\nNEUSUM_HOME=~/workspace/neusum\nmkdir -p $NEUSUM_HOME/code\ncd $NEUSUM_HOME/code\ngit clone --recursive https://github.com/magic282/NeuSum.git\n```\nAfter preparation, the workspace looks like:\n```\nneusum\n├── code\n│   └── NeuSum\n│       └── neusum_pt\n│           ├── neusum\n│           └── PyRouge\n└── data\n    └── cnndm\n        ├── dev\n        ├── glove\n        ├── models\n        └── train\n```\n\nThe paper used CNN / Daily Mail dataset.\n \n[About the CNN Daily Mail Dataset](https://gist.github.com/magic282/e4b2ecc91f185939b2688863ae9e41c1)\n\n[About the CNN Daily Mail Dataset 2](https://github.com/magic282/cnndm_acl18)\n### Setup the environment\n#### Package Requirements:\n```\nnltk numpy pytorch\n```\n**Warning**: Older versions of NLTK have a bug in the PorterStemmer. Therefore, a fresh installation or update of NLTK is recommended.\n\nA Docker image is also provided.\n#### Docker image\n```bash\ndocker pull magic282/pytorch:0.3.0\n```\n### Run training\nThe file `run.sh` is an example. Modify it according to your configuration.\n#### Without Docker\n```bash\nbash $NEUSUM_HOME/code/NeuSum/neusum_pt/run.sh $NEUSUM_HOME/data/cnndm $NEUSUM_HOME/code/NeuSum/neusum_pt\n```\n#### With Docker\n```bash\nnvidia-docker run --rm -ti -v $NEUSUM_HOME:/workspace magic282/pytorch:0.3.0\n```\nThen inside the docker:\n```bash\nbash code/NeuSum/neusum_pt/run.sh /workspace/data/cnndm /workspace/code/NeuSum/neusum_pt\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagic282%2FNeuSum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagic282%2FNeuSum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagic282%2FNeuSum/lists"}