摘要将与列表一起使用属性

发布于 2025-01-23 21:15:53 字数 845 浏览 1 评论 0原文

我使用python中的管道来概述评论

此代码有效,并给了我摘要:

    article = 'Everything is good and clean, but the swimming pool does not work at this time, according to their words, they say maintenance and God knows Parking needs umbrellas Breakfast is good and the bed is excellent and comfortable and the view of the room is great.'
    text = summarizer(article)[0]['summary_text']

但这不起作用:

text = summarizer(chunks[0])[0]['summary_text']

尽管块[0]包含与actial> acrets的文本相同的文本

错误是: “在此处输入图像描述”

为什么它不起作用?我应该怎么办?我需要在循环

编辑中总结的所有项目:

我通过减小块[0]的大小来解决它,以便摘要器可以接受。

I use the pipeline in python to summarize reviews

This code works and gives me the summary:

    article = 'Everything is good and clean, but the swimming pool does not work at this time, according to their words, they say maintenance and God knows Parking needs umbrellas Breakfast is good and the bed is excellent and comfortable and the view of the room is great.'
    text = summarizer(article)[0]['summary_text']

But this doesn't work:

text = summarizer(chunks[0])[0]['summary_text']

despite chunks[0] containing the same text as article

And the error is: enter image description here

Why won't it work? what should I do? I need to summarize all items of chunks in a loop

Edit:

I solve it by reducing the size of chunks[0] so the summarizer could accept it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文