{"id":13753300,"url":"https://github.com/bojone/SPACES","last_synced_at":"2025-05-09T20:35:15.252Z","repository":{"id":41476955,"uuid":"320153564","full_name":"bojone/SPACES","owner":"bojone","description":"端到端的长本文摘要模型（法研杯2020司法摘要赛道）","archived":false,"fork":false,"pushed_at":"2024-05-31T06:48:10.000Z","size":153,"stargazers_count":394,"open_issues_count":29,"forks_count":91,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-05T08:09:07.769Z","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/bojone.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":"2020-12-10T03:55:00.000Z","updated_at":"2025-03-30T09:38:44.000Z","dependencies_parsed_at":"2024-08-03T09:15:51.007Z","dependency_job_id":null,"html_url":"https://github.com/bojone/SPACES","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/bojone%2FSPACES","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bojone%2FSPACES/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bojone%2FSPACES/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bojone%2FSPACES/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bojone","download_url":"https://codeload.github.com/bojone/SPACES/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253321859,"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":[],"created_at":"2024-08-03T09:01:19.905Z","updated_at":"2025-05-09T20:35:10.171Z","avatar_url":"https://github.com/bojone.png","language":"Python","funding_links":[],"categories":["文本摘要"],"sub_categories":[],"readme":"# SPACES\n端到端的长文本摘要模型（法研杯2020司法摘要赛道）。\n\n博客介绍：https://kexue.fm/archives/8046\n\n## 含义\n\n我们将我们的模型称为SPACES，它正好是科学空间的域名之一（[https://spaces.ac.cn](https://spaces.ac.cn)），具体含义如下：\n- **S**：Sparse Softmax；\n- **P**：Pretrained Language Model；\n- **A**：Abstractive；\n- **C**：Copy Mechanism；\n- **E**：Extractive；\n- **S**：Special Words。\n\n顾名思义，这是一个以词为单位的、包含预训练和Copy机制的“抽取-生成”式摘要模型，里边包含了一些我们对文本生成技术的最新研究成果。\n\n## 运行\n\n实验环境：tensorflow 1.14 + keras 2.3.1 + bert4keras 0.9.7\n\n(如果是Windows，请用bert4keras\u003e=0.9.8)\n\n首先请在`snippets.py`中修改相关路径配置，然后再执行下述代码。\n\n训练代码：\n```bash\n#! /bin/bash\n\npython extract_convert.py\npython extract_vectorize.py\n\nfor ((i=0; i\u003c15; i++));\n    do\n        python extract_model.py $i\n    done\n\npython seq2seq_convert.py\npython seq2seq_model.py\n```\n\n预测代码\n```python\nfrom final import *\nsummary = predict(text, topk=3)\nprint(summary)\n```\n\n## 交流\n\nQQ交流群：808623966，微信群请加机器人微信号spaces_ac_cn\n\n## 链接\n\n- 博客：https://kexue.fm\n- 追一：https://zhuiyi.ai/\n- 预训练模型：https://github.com/ZhuiyiTechnology/pretrained-models\n- WoBERT：https://github.com/ZhuiyiTechnology/WoBERT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbojone%2FSPACES","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbojone%2FSPACES","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbojone%2FSPACES/lists"}