{"id":21433293,"url":"https://github.com/guokr/brief","last_synced_at":"2025-10-01T17:31:22.508Z","repository":{"id":57416380,"uuid":"163284205","full_name":"guokr/Brief","owner":"guokr","description":"In a nutshell, this is a Text Summarizer","archived":false,"fork":false,"pushed_at":"2019-01-15T08:57:28.000Z","size":111,"stargazers_count":42,"open_issues_count":2,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-13T21:15:10.723Z","etag":null,"topics":["pytorch","text-summarization","text-summarizer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guokr.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}},"created_at":"2018-12-27T11:02:34.000Z","updated_at":"2024-10-28T08:21:18.000Z","dependencies_parsed_at":"2022-09-26T17:11:28.846Z","dependency_job_id":null,"html_url":"https://github.com/guokr/Brief","commit_stats":null,"previous_names":["guokr/anutshell"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guokr%2FBrief","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guokr%2FBrief/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guokr%2FBrief/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guokr%2FBrief/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guokr","download_url":"https://codeload.github.com/guokr/Brief/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234720803,"owners_count":18876680,"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":["pytorch","text-summarization","text-summarizer"],"created_at":"2024-11-22T23:27:12.159Z","updated_at":"2025-10-01T17:31:17.208Z","avatar_url":"https://github.com/guokr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eBrief\u003c/h1\u003e\n\nBrief is a text summarizer based on sequence to sequence framework, implemented in Python and Facebook's \u003ca href=\"https://pytorch.org/\"\u003ePyTorch\u003c/a\u003e project. In a nutshell, this is Brief.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pypi.org/project/brief/\"\u003e\n      \u003cimg src=\"https://img.shields.io/pypi/v/brief.svg?colorB=brightgreen\"\n           alt=\"Pypi package\"\u003e\n    \u003c/a\u003e\n  \u003ca href=\"https://github.com/guokr/brief/releases\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/release/guokr/brief.svg\"\n           alt=\"GitHub release\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/guokr/brief/issues\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues/guokr/brief.svg\"\n             alt=\"GitHub issues\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/guokr/Brief/\"\u003e\n    \u003cimg src=\"https://travis-ci.org/guokr/Brief.svg\"\n         alt=\"Travis CI\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#quick-demo\"\u003eDemo\u003c/a\u003e •\n  \u003ca href=\"#requirements\"\u003eRequirements\u003c/a\u003e •\n  \u003ca href=\"#install\"\u003eInstall\u003c/a\u003e •\n  \u003ca href=\"#did-you-guys-have-some-pre-trained-models\"\u003ePre-trained models\u003c/a\u003e •\n  \u003ca href=\"#how-to-train-on-your-own-dataset\"\u003eTrain\u003c/a\u003e •\n  \u003ca href=\"#more-examples\"\u003eExamples\u003c/a\u003e •\n  \u003ca href=\"https://guokr.github.io/Caver/\"\u003eDocument\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003eQuick demo\u003c/h2\u003e\n\n```python\nfrom brief import BriefModel\nmodel = BriefModel(\"./checkpoint_transformer\")\n\nlong_text = (\"为 期 三 个 月 的 全 国 公 路 执 法 专 项 整 改 工 作 刚 结 束 ，\n              整 治 重 点 包 括 对 非 法 超 限 运 输 车 辆 只 收 费 不 卸 载 、 \n              伙 同 社 会 闲 散 人 员 擅 自 放 行 等 。 然 而 ， 在 重 要 省 道 滨 唐 公 路 津 冀 交 界 处 ，\n              执 法 治 超 沦 为 摆 设 ， 大 肆 收 费 后 擅 自 放 行 ， 超 载 问 题 严 重 失 控 。\")\n             \nmodel.summarize([long_text])\n\u003e\u003e\u003e 津 冀 交 界 公 路 治 超 载 乱 象 严 重 ， 官 卡 执 法 沦 为 摆 设 。\n\nlong_text = (\"眼 下 ， 白 酒 业 “ 塑 化 剂 门 ” 继 续 发 酵 ， \n              业 内 业 外 各 有 说 法 。 酒 鬼 酒 公 司 股 票 继 续 停 牌 。 \n              记 者 走 访 郑 州 市 场 发 现 ， 商 家 并 未 将 酒 鬼 酒 和 其 他 白 酒 下 架 ， \n              白 酒 销 量 暂 时 稳 定 ， 未 受 影 响 。 专 家 提 醒 ： 塑 化 剂 溶 于 酒 精 ， \n              应 避 免 用 塑 料 制 品 盛 装 白 酒 。\")\n              \nmodel.summarize([long_text])\n\u003e\u003e\u003e 河 南 白 酒 未 受 “ 塑 化 剂 门 ” 冲 击 ， 喝 酒 别 用 塑 料 杯 。\n```\n\n\u003ch2 align=\"center\"\u003eRequirements\u003c/h2\u003e\n\n* PyTorch\n* tqdm\n* torchtext\n* dill\n* numpy\n* Python3\n\n\u003ch2 align=\"center\"\u003eInstall\u003c/h2\u003e\n\n```bash\n$ pip install brief --user\n```\n\n\u003ch2 align=\"center\"\u003eDid you guys have some pre-trained models\u003c/h2\u003e\nYes, we will release two pre-trained models on LCSTS dataset on word-level and char-level separately.\n\n\u003ch2 align=\"center\"\u003eHow to train on your own dataset\u003c/h2\u003e\n\n```bash\npython3 train.py --train_filename train_full.tsv \n                 --valid_filename valid_full.tsv\n                 --checkpoint_dir /data_hdd/brief_dev/checkpoint_exp\n                 --epoch 10\n                 --batch_size 128\n```\n\u003ch2 align=\"center\"\u003eMore examples\u003c/h2\u003e\nUpdating...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguokr%2Fbrief","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguokr%2Fbrief","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguokr%2Fbrief/lists"}