Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
huolongshe 4ea9723652 | 2 months ago | |
---|---|---|
app | 11 months ago | |
docs | 1 year ago | |
webapp | 1 year ago | |
.gitignore | 2 years ago | |
Dockerfile | 1 year ago | |
LICENSE | 2 years ago | |
README.md | 2 months ago | |
application.yml | 1 year ago | |
build-docker.sh | 1 year ago | |
pack_model.py | 1 year ago | |
pip-install-reqs.sh | 1 year ago | |
requirements.txt | 9 months ago | |
run_model_server.py | 1 year ago |
如果能从3000字的文章,提炼出150字的摘要,就可以为读者节省大量阅读时间。由人完成的摘要叫"人工摘要",由机器完成的就叫"自动摘要"。许多网站都需要它,比如论文网站、新闻网站、搜索引擎等等。2007年,美国学者的论文《A Survey on Automatic Text Summarization》(Dipanjan Das, Andre F.T. Martins, 2007)总结了目前的自动摘要算法。其中,很重要的一种就是词频统计。
这种方法最早出自1958年的IBM公司科学家H.P. Luhn的论文《The Automatic Creation of Literature Abstracts》。Luhn博士认为,文章的信息都包含在句子中,有些句子包含的信息多,有些句子包含的信息少。"自动摘要"就是要找出那些包含信息最多的句子。句子的信息量用"关键词"来衡量。如果包含的关键词越多,就说明这个句子越重要。Luhn提出用"簇"(cluster)表示关键词的聚集。所谓"簇"就是包含多个关键词的句子片段。
Luhn原始论文的插图中被框起来的部分就是一个"簇"。只要关键词之间的距离小于"门槛值",它们就被认为处于同一个簇之中。Luhn建议的门槛值是4或5。也就是说,如果两个关键词之间有5个以上的其他词,就可以把这两个关键词分在两个簇。
下一步,对于每个簇,都计算它的重要性分值。
以前图为例,其中的簇一共有7个词,其中4个是关键词。因此,它的重要性分值等于 ( 4 x 4 ) / 7 = 2.3。
然后,找出包含分值最高的簇的句子(比如5句),把它们合在一起,就构成了这篇文章的自动摘要。
本模型基于 ServiceBoot微服务引擎 进行服务化封装,参见: 《CubeAI模型开发指南》
$ sh pip-install-reqs.sh
$ serviceboot start
或
$ python3 run_model_server.py
一键式本地容器化部署和运行,参见: 《CubeAI模型独立部署指南》 或 CubeAI Docker Builder
本模型服务可一键发布至 CubeAI智立方平台 进行共享和部署,参见: 《CubeAI模型发布指南》
本模型提供了1个API接口:
API接口1:
API端点: /api/data
HTTP方法: POST
HTTP请求体:
{
"action": "predict"
"args": {
"text": <中文短文>
}
}
HTTP响应体:
{
"status": "ok"|"err",
"value": <中文摘要>
}
中文摘要生成
TypeScript Python HTML Shell Dockerfile other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》